Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 1 down vote accepted

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().

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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