Luc Hermitte's VIM e-mail ftplugins | Monday 22nd November 2004 |
The ftplugins that follow are dedicated to the composition of electronic
messages (ie. e-mails and usenet posts) ; they propose several
settings, automatic commands and mappings. They have been strongly inspired by
Sven
Guckes's .vimrc
. While some of them have been extended, I
haven't ever customized others.
In order to install them, as usual, drop them in the appropriate folder that is
: $HOME/vimfiles/ftplugin/mail
(on
Ms-Windows® systems) or $HOME/.vim/ftplugin/mail
(on *NIX systems) ; for
others OSes, check «:help 'runtimepath'
».
mail_set.vim <raw file> help on : <C-F1> |
This file gathers general mappings and settings. It directly come from Sven Guckes's file. |
Mail_Re_set.vim <raw file> |
May be, you have already noticed and used the two macros :
,re that merges all the "[Rr][Ee]:"
in the subject in only one "Re:" and
,Re that merges "[Rr][Re]: Re[n]" in
"Re[n+1]" . This ftplugin combines the features from both macros without any visual bell or incrementation of the first number in the subject. It is executed automatically from mail_set.vim and
thus corrects the subject header without any intervention. The script can now be configurated regarding :
|
Mail_mutt_alias_set.vim <raw file> |
This ftplugin will ease the insertion of MUTT e-mail aliases
from within VIM.
In order to use it, you will have to specify the path to your
mutt_aliases file. Feel free to extend this ftplugin to support other the aliases formats from other MUAs.
The script remaps You could also be interested in the script from Brian Medley that supports calls to Abook and Mutt, or Todd Boland's simplified version of my script ; both on sourceforge. |
Mail_Sig_set.vim <raw file> |
I define in this ftplugin an alternative to the macro map ,kqs G?^> *-- $<CR>dGIt comes as a command. This time, VIM won't complains about not found ^> *-- $ pattern. BTW, I also delete all
the empty lines (quoted or not) just above the signature to
delete.Lately, I've integrated Yann Kerhervé's improvement over my function in order to keep your automatically inserted (by mutt) signature -- I guess his page is in French. Moreover, if you reply to a mailing list that inserts another signature (introduced by dashes), the ftplugin will delete up to two possible dashes-delimited signatures. It also support different quote characters thanks to the variables g:my_indent_char and
g:quote_chars .N.B., Brian Medley's e-mail FTplugin also extends the quote characters recognized and proposes other interresting features.
This ftplugin also proposes an 'operator-pending' mapping :
|
Mail_Moderation_set.vim <raw file> |
This file is designed to ease the moderation of
modappbot-moderated newsgroups. More precisely, it defines a
mapping (,mod ) that enables to correctly set the
headers of custom responses to problematic posts. Suppose that modappbot sends an article for your approval and you want to write an appropriate and customized denial. Instead of forwarding the message to a copy-pasted address, changing the subject, and so on, reply to the message modappbot sent to you, hit ,mod from VIM and then write.You may have to customize the script in several places in order to define the newsgroups you moderate, the address of the server associated moderators' mailing lists, the tags of the subject, your signature and so on. Note that this version is an ugly mix between two generations of VIM scripting. You may also be interested by my other moderation stuff for modappbot ... pages still to be writen... |
Mail_cc_set.vim <raw file> |
Bothered of receiving a copy of all your messages when you
reply to a group of people ? Well, this file is for you ! All you have to do is to change my e-mail address to yours. Works fine with mutt and elm ; I haven't tested any other MUA. BTW, Mutt already handle this problem. |
Back to the ftplugins page | hermitte at free.fr |