2

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.

Drew
  • 27,527
  • 6
  • 62
  • 88
Lemurata
  • 175
  • 1
  • 10
  • Questions about *using* programs such as Emacs are off-topic for Stack Overflow unless they are specific to programming modes; you may be able to get help on [emacs.se] or [su]. If your question is about programming Emacs, then please [edit] to include a [mcve] of the Lisp or C code you're having trouble with. – Toby Speight Feb 26 '18 at 17:33
  • Sorry I don't understand your objections. I see plenty of questions about **using** emacs, like for example: https://stackoverflow.com/questions/270930/using-emacs-to-recursively-find-and-replace-in-text-files-not-already-open It also includes example: I am looking for something similar to the functionality vim has (^X^L) – Lemurata Feb 26 '18 at 18:26
  • 3
    @TobySpeight: Huh? Since when? Not so - at all, AFAIK. – Drew Feb 26 '18 at 18:31
  • @Lemurata: yeah, that one looks off-topic as well; it ought to be flagged. – Toby Speight Feb 27 '18 at 08:55

1 Answers1

4

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.

Rorschach
  • 28,468
  • 5
  • 66
  • 112