我经常使用dired-mode,最近开始使用ido
(ido-mode 1); enable ido-mode
(setq ido-enable-flex-matching t); flexibly match names via fuzzy matching
(setq ido-everywhere t); use ido-mode everywhere, in buffers and for finding files
(setq ido-use-filename-at-point 'guess); for find-file-at-point
(setq ido-use-url-at-point t); look for URLs at point
(setq ffap-require-prefix t); get find-file-at-point with C-u C-x C-f 当我在dired buffer中复制一个文件(使用C)时,我仍然必须使用“标准方式”来指定文件要复制到的新位置。这意味着,我必须使用标准的制表符完成,但没有ido-completion。这同样适用于用于移动文件等的R。因此,我想知道是否有可能让ido也作用于dired缓冲区中的C或R?
发布于 2012-07-16 23:39:10
看起来我遇到了和你一样的问题。一些调查表明,我们需要覆盖默认情况下调用read-file-name-function-default的变量read-file-name-function。但是,查看ido-everywhere的源代码(这是一个次要模式),它为我们做到了这一点。
解决方案:
而不是执行(setq ido-everywhere t),将其替换为:
(ido-everywhere t)
这为我解决了这个问题,当你使用C或类似的东西时,会导致ido-read-file-name在dired中被调用。
另一个选项:
您也可以考虑这个增强版的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.发布于 2013-01-06 01:28:57
我发现R键的(put 'dired-do-rename 'ido 'find-file)运行得很好,如果你需要在路径处停止,你只需按C-j键而不是完成一个文件名。
https://stackoverflow.com/questions/11505878
复制相似问题