Get ido in dired buffers

北慕城南 提交于 2019-12-05 09:42:18

Looks like I had the same problem you are experiencing. Some investigating shows that we need to override the variable read-file-name-function which, by default, calls read-file-name-function-default. But, looking at the source code for ido-everywhere (which is a minor mode), it does this for us.

Solution:

Rather than doing (setq ido-everywhere t), replace that with:

(ido-everywhere t)

This fixes it for me, causing ido-read-file-name to be called in dired buffers when you use C or similar.

Another Option:

You might also consider this beefed up version of ido-everywhere:

https://github.com/DarwinAwardWinner/ido-ubiquitous

;;; Commentary:

;; You may have seen the `ido-everywhere' variable in ido.el and got
;; excited that you could use ido completion for everything. Then you
;; were probably disappointed when you realized that it only applied
;; to *file names* and nothing else. Well, ido-ubiquitous is here to
;; fulfill the original promise and let you use ido completion for
;; (almost) any command that uses `completing-read' to offer you a
;; choice of several alternatives.

I found that (put 'dired-do-rename 'ido 'find-file) for the R key works fine, if you need to stop at a path you simply press C-j instead of completing a file name.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!