24

IDO mode is awesome. It's essential to know the basic shortcuts, especially the escape hatch Ctrl-f (introduction-to-ido-mode/) which gets you out of ido-mode.

In dired, if I want to copy a file to a directory, I can't seem to use ido to pick the directory, not can I even use the current ido directory that I've navigated to. There should be some way to say "pick directory" or at least enable the ctrl-f option to use the current spot in IDO. Does anybody know how to do this? (yes, you can disable ido mode for dired, but that is not what I want to do).

daramarak
  • 6,115
  • 1
  • 31
  • 50
justingordon
  • 12,553
  • 12
  • 72
  • 116

3 Answers3

37

You can use C-j, which is bound to (ido-select-text) and selects the buffer currently named by the prompt, which might be a directory as well.

sinelaw
  • 16,205
  • 3
  • 49
  • 80
Philipp
  • 386
  • 3
  • 3
28

You can use "C-d" in ido mode, minibuffer

Kimi
  • 341
  • 3
  • 4
  • 2
    Not sure the reason for the downvote, this worked for me. C-d is easier to remember than C-j for choosing a directory. – killdash9 Sep 17 '13 at 14:11
  • "C-d" is bound to "delete-char" in the default Emacs keybindings, so this will not work for most people. – Bklyn Jul 08 '14 at 13:29
  • 3
    @Bklyn: I don't think that's the case. `C-d` is bound to ido-magic-delete-char in the minibuffer, and the documentation says `"If at end of user input, perform magic actions: C-x C-f ... C-d enter 'dired' on current directory."` – Clément Mar 26 '15 at 19:16
  • Weirdly, this didn't work for me (Emacs 26.1). I verified with "C-h k" that C-d is actually bound to ido-magic-delete-char in an ido minibuffer. "C-j" answered above does work. – John de Largentaye Aug 08 '18 at 21:19
7

An alternative is to enable

(setq ido-show-dot-for-dired t)

and then you can open directories by opening the . file which will always be the first entry for a directory that you descend into.

fommil
  • 5,757
  • 8
  • 41
  • 81
  • I don't like that C-x C-f bound to ido-find-file does not accept dir as input, but this solution works acceptably – nbecker Feb 01 '16 at 20:30