vim-mailquery : complete e-mail addresses in Vim by those in your inbox
script karma |
Rating 0/0,
Downloaded by 586 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Enno Nagel |
|
script type |
ftplugin |
|
description |
This plug-in lets you complete e-mail addresses in Vim by those in your
inbox (or any other mail folder) via https://github.com/pbrisbin/mail-query
1. Usage
When you're editing a mail file in Vim that reads
From: Fulano <Fulano@Silva.com>
To: foo
and in your Inbox there is an e-mail from
Mister Foo <foo@bar.com>
and your cursor is right after foo, then hit Ctrl+X Ctrl+O to obtain:
From: Fulano <Fulano@Silva.com>
To: Mister Foo <foo@bar.com>
That is, you can complete e-mail addresses inside Vim by pressing CTRL-X
CTRL-O inside insert mode. See also :help i_CTRL-X_CTRL-O and :help
compl-omni.
2. Setup
2.1. Download and install (by `sudo make install`) mail-query from
https://github.com/pbrisbin/mail-query.
If you have no superuser rights, then compile it (by `make`) and
add the path of the folder that contains the obtained executable
mail-query (say `~/bin`) to your environment variable `$PATH`: in
case you use `bash` or `zsh`, by adding to `~/.profile` or
`~/.zshenv` the line
PATH=$PATH:~/bin
To decode 7-bit ASCII encoded MIME-headers as specified at
https://tools.ietf.org/html/rfc2047) (which start, for example,
with `=?UTF-8?`), ensure that `perl` is executable and the
Encode::MIME:Header module is installed.
2.2. The mail folder is automatically set to the value of the variable
`$folder` in the file `~/.muttrc`. To explicitly set the path to a
mail folder `$folder`, add to your `.vimrc` the line
let g:mailquery_folder = '$folder'
For example, if you use mbsync, then `$folder` could be
$XDG_DATA_HOME/mbsync/INBOX/cur
2.3. If you would like to filter out most probably impersonal e-mail
addresses such as those coming from mailer daemons or accepting no
reply, then try adding
let g:mailquery_filter = 1
to your `vimrc`, which will discard e-mail addresses that satisfy
the regular expression given by the variable `g:mailquery_filter_regex`.
3. Related Plug-in:
The Vim plug-in https://github.com/Konfekt/vim-mutt-aliases lets you
complete e-mail addresses in Vim by those in your mutt aliases file,
and (when the alias file is periodically populated by the mutt-alias.sh
shell script from https://github.com/Konfekt/mutt-alias.sh) gives a
more static alternative to this plug-in.
===
This plug-in is developed at https://github.com/Konfekt/vim-mailquery
where issues can be filed.
|
|
install details |
Unzip vim-mailquery.zip into ~/.vim on Linux or or MacOS. |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 3.20.238.187
|