Reputation: 3850
I usually keep two buffers side by side, say left-buffer
and right-buffer
.
As I frequently need to check directory structure for the current buffer I am editing (this happens often when I am writing javascript
files and need to include another script with relative path), I type C-x C-f
to open ido
mode and then type Enter
to open dired.
Problem is, this way the dired
buffer took the place of my current left-buffer
which I am working on.
Is there a way to open ido-mode
in "the other buffer" (here is the right-buffer
)?
EDIT
I also have projectile-mode
winner-mode
installed. If any of these mode contains ready-command to do so, it will work as well.
Upvotes: 1
Views: 461
Reputation: 9437
Enable opening the pwd in ido:
(setq ido-show-dot-for-dired t)
Then you can do e.g. C-x C-f
and one of the options is .
, which will open a dired buffer for the pwd.
There's a command find-file-in-other-window
, bound to C-x 4 f
and C-x 4 C-f
by default, that you can use to open any file, including a directory, in another window.
Note that default-directory
is the directory that ido looks in, not necessarily the directory of buffer-file-name
, though default-directory
defaults to that.
Upvotes: 1