ido(查找文件)中带有空格的路径(在 MS Windows 上)
我在 Windows 机器上运行 GNU Emacs 23,并且在获取 ido-find-file 来匹配包含空格的文件时遇到问题。
在我的 .emacs 中,我 (setq ido-use-filename-at-point t)
想要匹配像 "D:\Dokumente und Einstellungen\Username\Eigene Dateien\Scratch 这样的字符串\ipswitch.bat"
当点击 Cx Cf
时。
当点位于 "
和 D:\
之间时,IDO 建议 d:/Dokumente[Dokumente und Einstellungen]
,即模式“中断” )
我希望匹配并建议整个字符串(如果需要,可能仅限于某些模式(例如组织模式)
。
I am running GNU Emacs 23 on a Windows-machine and having problems getting ido-find-file
to match files that contain whitespaces.
In my .emacs I (setq ido-use-filename-at-point t)
and would like to match a string like "D:\Dokumente und Einstellungen\Username\Eigene Dateien\Scratch\ipswitch.bat"
when hitting C-x C-f
.
When point is located between "
and D:\
, IDO suggests d:/Dokumente[Dokumente und Einstellungen]
, i.e. the pattern "breaks" on the whitespaces.
I would like the whole string (maybe restricted to certain modes (like org-mode) if that is necessary) to be matched and suggested.
How could I get that working?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我还没有找到 ffap/thingatpt 的解决方案,但对于 ido 模式, init.el 中的以下代码可以产生奇迹。
我在 Windows 上使用 Gnu Emacs 和 ido 模式,并且在更改迷你缓冲区完成映射中找到了乐趣:
注释警告说它是“实验性的”,因此我可以在遇到奇怪行为时反转它。但我已经使用了一年多了,没有任何问题。
现在,当我执行
Cx Cf C:/Doc
ido-mode 时,建议
C:/Documents and Settings/
I have not found a solution for ffap/thingatpt, but for ido-mode the following code in init.el works wonders.
I use Gnu Emacs on Windows with ido-mode, and have found joy in changing the minibuffer completion map:
The comment warns it is "experimental" so I can reverse it in case I ever encounter strange behavior. But I have used this for over a year now with no problems.
Now when I do
C-x C-f C:/Doc
ido-mode suggests
C:/Documents and Settings/