Take the 2-minute tour ×
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.

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

1 Answer 1

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

 
discard

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.