I'm playing around with various bits of an email solution, including notmuch and alot. I write my emails in vim and I'd like to have tab completion of email addresses while writing email. Is there a general plugin that would do something like this for me?

Ideally it would have a variable for what command to run and write and accept one of the standard address book formats - say mutt's format.

Plugins I've found so far:

  • email.vim - basic and based on a single text file, but probably the easiest to hack if I can't find anything better
  • lbdbq and lbdbQuery.vim which both use lbdb

The addressbook I'm currently using is nottoomuch-addresses


You can write your own custom insert-mode completion, and :imap that for easy access. There's an example in the help at :help E840 that shows the boilerplate; you just need to implement the email address query, probably either with system() or readfile().

|improve this answer|||||

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.