迷你缓冲区中的智能选项卡
我刚刚发现 Hippie-expand 在迷你缓冲区中工作(通过 M=/),但是我使用智能选项卡(通过 TAB)来完成(和缩进)在标准编辑期间。在迷你缓冲区中按 TAB 只会插入 4 个空格 - 这可能是我永远不想要的。有没有办法在迷你缓冲区中直接使用智能选项卡进行嬉皮扩展?我已经完成了路径、缓冲区和扩展命令(通过 ido/smex),但希望将其用于需要输入的所有内容(例如替换、搜索、刷新/保持行等)。
目前我简单地使用(Emacs 23.3):
(setq tab-always-indent 'complete)
尽管过去我有更复杂的智能选项卡设置,但它在迷你缓冲区中也不起作用...
谢谢你!
I've just found out that Hippie-expand works in the mini-buffer (via M=/), however I use smart-tab (via TAB) for completion (and indentation) during standard editing. Hitting TAB in the minibuffer only inserts 4 spaces - which is something likely I'd never actually want. Is there a way to do directly Hippie-expand with smart-tab in the mini-buffer? I have completion for paths, buffers and extended commands (through ido/smex), but would like to have it for everything (e.g. for replace, search, flush/keep-line etc.) that needs input.
At the moment I use simply (Emacs 23.3):
(setq tab-always-indent 'complete)
although in the past I had more elaborate smart-tab settings and it also didn't work in the minibuffer...
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您根本不需要智能选项卡即可完成选项卡迷你缓冲区。您可以尝试 icomplete-mode 来代替:
因为 smart-tab 只是缩进或完成,并且在 minubuffer 中您永远不想缩进,我想它基本上是相同的。
I don't think you need smart-tab at all to get tab minibuffer completion. You might try icomplete-mode instead:
Since smart-tab just indents or completes and in the minubuffer you never want to indent I guess it's basically the same.
Icicles 为您提供 (TAB) 补全几乎每次使用迷你缓冲区时都会发生这种情况,唯一的例外是调用代码以不允许完成的方式显式使用迷你缓冲区时。
(但是当构建 Lisp sexps 时(例如使用 M-:),您可以使用 M-TAB 来完成单个符号。)
Icicles gives you (TAB) completion pretty much whenever the minibuffer is used, the only exceptions being when the calling code explicitly uses the minibuffer in a way that does not allow completion.
(But when constructing Lisp sexps (e.g. with M-:), you can use M-TAB to complete individual symbols.)