gpt4 book ai didi

emacs - 在 dired 缓冲区中获取 ido

转载 作者:行者123 更新时间:2023-12-04 17:38:13 30 4
gpt4 key购买 nike

我经常使用 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还作用于 CR在糟糕的缓冲区中?

最佳答案

看起来我遇到了与您遇到的相同问题。一些调查表明我们需要覆盖变量 read-file-name-function默认情况下,它调用 read-file-name-function-default .但是,查看 ido-everywhere 的源代码(这是一个次要模式),它为我们做这件事。

解决方案:

而不是做 (setq ido-everywhere t) ,将其替换为:
(ido-everywhere t)
这为我修复了它,导致 ido-read-file-name当您使用 C 时在 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.

关于emacs - 在 dired 缓冲区中获取 ido,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11505878/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com