首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在dired缓冲区中获取ido

在dired缓冲区中获取ido
EN

Stack Overflow用户
提问于 2012-07-16 21:56:34
回答 2查看 1.5K关注 0票数 5

我经常使用dired-mode,最近开始使用ido

代码语言:javascript
复制
(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缓冲区中的CR

EN

回答 2

Stack Overflow用户

发布于 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

代码语言:javascript
复制
;;; 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.
票数 6
EN

Stack Overflow用户

发布于 2013-01-06 01:28:57

我发现R键的(put 'dired-do-rename 'ido 'find-file)运行得很好,如果你需要在路径处停止,你只需按C-j键而不是完成一个文件名。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11505878

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档