Search code examples
emacsdiredido

How to work with ido-vertical-mode inside dired-mode


For example, in the Dired window when I type C on a file called test123.csv under my D: drive, the minibuffer shows:

Copy test123.csv to d:/
->test123.csv
  hello.csv

If I type RET now, Emacs will say that it can't copy the file since it already exists. But what I need is to let it auto-complete to d:\test123.csv and then edit the file name to d:\test123.back.csv. But how to do it?


Solution

  • You mentioned in the comments that you are using ido-vertical-mode in conjunction with ido-everywhere. There are several things you can do:

    • Completely disable ido-everywhere (as you suggested yourself) by removing

      (ido-everywhere)
      

      from your .emacs file.

    • Disable ido-everywhere only for dired buffers:

      (defun disable-ido-everywhere ()
        (ido-everywhere -1))
      (add-hook 'dired-mode-hook 'disable-ido-everywhere)
      
    • Don't disable ido-everywhere at all and use the following workflow (which is very similar to what you would do without ido-everywhere enabled):

      1. Press C.

      2. Type the first few characters of the name of the file you want to copy followed by TAB. Repeat until file name has been completed fully (or up to a point at which it makes sense to start editing it).

      3. Edit the file name and press RET when done.