sponsor Vim development Vim logo Vim Book Ad

vim-mutt-aliases : complete e-mail addresses in Vim by those in your mutt aliases file

 script karma  Rating 0/0, Downloaded by 149  Comments, bugs, improvements  Vim wiki

created by
Enno Nagel
script type
This plug-in lets you complete mutt aliases (listed in ~/.mutt/aliases) inside
Vim; useful when using Vim as editor for mutt (especially with $edit_headers).
(See also the shell script https://github.com/Konfekt/mutt-alias.sh to populate
the aliases file with recent e-mail addresses in your Inbox or Sent folder).

1. Usage

When you're editing a mail file in Vim that reads

    To: foo

and in your mutt aliases file there is an entry

    alias foo mister.foo@bar.com

and your cursor is right after foo, then hit Ctrl+X Ctrl+U to obtain:

    To: mister.foo@bar.com

2. Commands

The command :EditAliases opens the mutt aliases file in Vim.
(For less typing, you can (command-line) alias it to ea by vim-alias
at https://github.com/Konfekt/vim-alias)

To complete e-mail addresses inside Vim press CTRL-X CTRL-U in insert
mode. See :help i_CTRL-X_CTRL-U and :help compl-function.

3. Setup

The mutt aliases file is set by $alias_file in the file ~/.muttrc. To
explicitly set the path to a mutt aliases file $file, add to your .vimrc the line

  let g:muttaliases_file = '$file'

For example, $file could be


4. Related Programs and Plug-ins:

To add mut aliases for all e-mail addresses found in a mail folder, such as the INBOX,
there is the shell script https://github.com/Konfekt/mutt-alias ; best run by a, say weekly,

The plugin https://github.com/Konfekt/vim-mailquery lets you complete e-mail
addresses in Vim by those in your Inbox (or any other mail folder).

5. Credits

Forked from Lu Guanqun's vim-mutt-aliases-plugin at https://github.com/guanqun/vim-mutt-aliases-plugin/
after commit 063a7bdd0d852a118253278721f74a053776135d.

6. License

Distributable under the same terms as Vim itself.  See :help license.


This plug-in is developed at https://github.com/Konfekt/vim-mutt-aliases where issues can be filed.
install details
Unzip vim-mutt-aliases.zip into the folder ~/.vim on Linux and MacOS or %USERPROFILE%\vimfiles on Windows.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-mutt-aliases.zip 1.1 2019-06-19 7.0 Enno Nagel sort matches by pertinence
vim-mutt-aliases.zip 1.0 2019-06-14 7.0 Enno Nagel Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
OSDN.net Logo