<<< Date Index >>>     <<< Thread Index >>>

Re: vim with fo+=a



On 2006-08-16, William Yardley <mutt-users@xxxxxxxxxxxxxxxxx> wrote:
> With auto-wrapping (fo+=a), I have a hard time editing the headers with 
> $edit_headers set. Thought I'd seen something about this before, but couldn't 
> find it. Anyone have a quick and easy way to deal with this, or should I try 
> the vim list?

Trying to edit headers with fo+=aw is a real pain.  I developed a 
solution when I was using vim 6.4 that works well enough, but it's a 
hack and I'm sure something better could be done now with some of 
the functions and autocommands added to vim 7.0.  For mail files, I 
have syntax highlighting turned on and a CursorHold autocommand that 
determines the syntax highlighting group that the cursor is in.  
Basically, if the group is mailHeader, mailEmail, mailSubject or 
mailSignature, 'a' and 'w' are removed from 'fo'; otherwise they are 
both added.

Regards,
Gary

-- 
Gary Johnson                               | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx                   | Wireless Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA