0

I am not sure if this is really a proper question but I am interested in having some opinions about the most efficient usage of Emacs' abbreviations features (abbrev/dabbrev) in combination with auto-completion/company and/or yasnippets.

At the moment I am using for my org mode stuff and some lisp tinkering abbrev-mode as a basic typo-correction system, i.e. substituting teh with the without further bothering me. yasnippets I use for specific and bigger expansions, e.g. special file headers for my hobby project etc. For everything in between I use auto-completion, e.g. saving a few key strokes while typing a function name. I am pretty happy with this and try to review my workflow constantly where I should define another abbreviation of where a snippet would save some time on common constructs. This means dabbrev is not needed at all for me, because either auto-completion jumps in automatically or I have already a larger snippet (or should have one).

Is this a common workflow? How to you use these different features in parallel?

1

As you already said, this is more a request for opinions than a question.

I think what you're doing is totally fine and done by many others, too. To me, one of Emacs' main advantages is that it can be fine tuned to many different workflows and approaches.

  • dabbrev is just always there. I bound dabbrev-expand to S-SPC to have it always really easily accessible.
  • More 'modern' completion mechanisms like company for in-buffer pop ups or ivy for the minibuffer are also widespread.
  • Take a look at auto-insert for dealing with new files that shouldn't be depressingly empty but rather have some basic setup already.
  • I would like to add skeletons to the pool. They come built-in and also provide kind of a templating system which I prefer over yasnippet and used for more than 15 years.
  • Also, don't underestimate the power of writing your own functions. Ultimately, you get the full power of Emacs Lisp there. It may be a bit more work than – say – defining a snippet with yasnippet, but they can do more things than snippets or skeletons can do.

There's many options. Find those that suit you best. Take your time. Start with what kinda works now, try out new things over the next years. My personal Emacs config is getting close to 25 years now and has seen at least four complete re-writes. :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.