Emacs是否具有单词和行补全功能(例如Vim的插入模式补全功能)? [英] Does Emacs has word and line completion (like Vim's insert mode completion)?
问题描述
Vim使用CTRL-X P
和CTRL-L.
来完成单词和行.有一个称为公司模式的Emacs插件,但是此插件会干扰Emacs中的许多事物并引起冲突(带有全局linum和yasnippets).我知道我可以在Emacs中使用CTRL-/来完成单词.但是可以使用以前编写的代码来完成代码吗?
Vim completes words and lines with CTRL-X P
and CTRL-L.
There's a Emacs plugin called Company mode but this plugin interfere and cause conflicts with lots of things within Emacs (with global linum and yasnippets). I know that I can complete words with CTRL-/ in Emacs. But it is possible to take previously written lines to complete code?
推荐答案
也许您正在寻找 hippie-扩展?在该网页上(无论如何,截至本文撰写时):
Maybe you're looking for hippie-expand? From that web page (as of this writing, anyway):
HippieExpand之前看过这个词 点并尝试将其扩展 各种方式,包括从 固定列表(例如
expand-abbrev
), 从中找到的匹配文本扩展 缓冲区(例如dabbrev-expand
)或 以您自己定义的方式扩展 功能.它尝试哪个和 由什么控制 可配置的功能列表.
HippieExpand looks at the word before point and tries to expand it in various ways including expanding from a fixed list (like
expand-abbrev
), expanding from matching text found in a buffer (likedabbrev-expand
) or expanding in ways defined by your own functions. Which of these it tries and in what order is controlled by a configurable list of functions.
有关完成选项的完整列表,请访问完成时的emacs Wiki页面.
For a comprehensive list of completion options visit the emacs wiki page on completion.
这篇关于Emacs是否具有单词和行补全功能(例如Vim的插入模式补全功能)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!