[Techtalk] Vim, mutt, and terminals

Caroline Patterson carolinp at hycomat.co.uk
Mon Oct 1 19:41:26 EST 2001


> Sven Guckes' mutt and vimrc page has this on it:
> 
>      	set editor=vim
>  You  can  supply some settings by starting vim with the "-c" option to
>  specify some commands. Example: Set the textwidth explicitly to "72":
>      	set editor="vim -c 'set tw=72'"
 
Very true. You can also make email-editing specific entries in .vimrc.
The following line (join it together) is an autocommand that sets the
textwidth, changes the comments string to be email-specific, and sets
formatoptions.

au bufnewfile,bufread /var/tmp/pico*,/tmp/pico*,.letter.*,.article* set
tw=72 comments=b:#,n:),n:>,nb:: fo=tcqr

 To format paragraphs, you can use the vim command gqap when in the
editor, if textobjects is compiled in to your version of vim (listed in
:ver ). gq does the formatting, and ap refers to "a paragraph".
Similarly gqG will format to the end of the document.


Caroline

-- 
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Caroline Patterson
http://www.hycomat.co.uk/caroline/
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=







More information about the Techtalk mailing list