Search code examples
emacscompletion

Emacs dabbrev-expand for whole line


Is there some possibility to achieve whole line completion in emacs? I mean something similar to vim's C-x C-l - like dabbrev-expand but completing whole line.


Solution

  • Yes, look at hippie-exp, which is part of base emacs. Specifically, add try-expand-line to hippie-expand-try-functions-list. Personally, I use a modification similar to this one that completes on closest matching prefix first.