Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Emacs has word and line completion (like Vim's insert mode completion)?

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?

like image 974
alexchenco Avatar asked Jan 19 '10 18:01

alexchenco


1 Answers

Maybe you're looking for hippie-expand? From that web page (as of this writing, anyway):

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 (like dabbrev-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.

For a comprehensive list of completion options visit the emacs wiki page on completion.

like image 51
Bryan Oakley Avatar answered Oct 07 '22 00:10

Bryan Oakley