On Sun, Jun 05, 2011 at 04:19:10PM -0400, Chris Brennan wrote:
* Ionel Mugurel Ciobica <[email protected]> [2011-06-05 21:37:13 +0200]:

If you use vim for other than editing e-mails, you may want not to add
that limit in your .vimrc. Instead add this to your .muttrc:

set editor="/usr/bin/vim -c 'set ft=mail et tw=72'"

Perfect, I will add that over textwidth in my .vimrc, thanks

That works OK for a small number of settings, but can become hard to manage. If vim filetype detection is enabled and working properly (entering ":set filetype" in command mode in vim returns "filetype=mail"), you can create $HOME/.vim/after/ftplugin/mail.vim and enter mail-specific settings there. For instance, mine starts out like:

syntax on
setlocal wrap
setlocal textwidth=72
" do text=flowed wrapping
setlocal formatoptions+=w
" don't autoindent or smartindent, as that just adds weird spaces into the
" middle of flowed text paragraphs
setlocal noautoindent nosmartindent

As you can see, you can take as much space as you want to make things easy for your future self to understand why you're selecting certain settings.

--
Ed Blackman

Attachment: signature.txt
Description: Digital signature

Reply via email to