我经常使用
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缓冲区中使用C
复制文件时,我仍然需要使用“标准方式”来指定文件被复制到的新位置。也就是说,我必须使用标准的TAB自动完成,但是没有ido
自动完成的选项。对于移动文件等操作,R
同样也适用。因此,我想知道是否可能让ido
在dired缓冲区中也能够支持C
或R
操作?
C
复制可以工作,但R
重命名和移动不能这样工作 :-( - Marius HofertC
是一个闭包,而R
是一个函数。 - Nicolas Dudebout(put 'dired-do-rename 'ido 'find-file)
会产生一个ido-completing read,并且对我重命名基本文件和目录没有任何不良后果。虽然我不建议这样做 - 我会提交一个错误报告/功能请求。 - assemcompleting-read
,即不读取文件或目录,因此它对此处的任何内容都没有帮助。其次,我故意在dired-do-rename
中禁用ido,不是因为它无法在那里工作,而是因为ido被优化用于完成现有文件名,而重命名的目的(通常)是创建一个新文件,而不是覆盖现有文件,因此ido并不真正针对重命名的用例进行优化。所以请放心在dired重命名时使用ido。 - Ryan C. Thompson