Emacs Completion Mechanisms

In a nice followup to yesterday’s post on Hippie Expand, deltille asks for clarification on the Emacs’ completion methods. His post was in response to Mickey’s article about hippie expand. Detille is a new Emacs user and is confused about when to use the various expansion Emacs mechanisms—there’s a lot of them—for completion.

Mickey jumps in with an excellent overview of the various methods and why you might want to use one or the other. To my mind, there’s a pretty bright line. If you want syntax-aware editing mediated by an LSP process then you should use completion-at-point or whatever your LSP package uses. If, like me, you’re mainly concerned with just minimizing typing, hippie-expand is the best bet. You can configure it to sequentially try any of the other methods. I use it many times a day and love it.

That leaves templates. If you want to expand a keyword into some text, perhaps with substitutions, then Yasnippet is a very nice solution. Mickey has some other recommendations but unless you have some special needs, Yasnippet is a good answer.

If, like many people, you’re confused by the plethora of completion/expander methods, take a look at this reddit post and Mickey’s answer.

This entry was posted in General and tagged . Bookmark the permalink.