On Tue, Apr 20, 1999 at 12:14:43AM +0200, Rejo wrote:


> Hi,

> I have set up a syntax file so i have colors within vim when
> editing an reply. I have this in my .muttrc:

> set editor="vim -u ~/.vimrc -c 'set textwidth=72'"

> When i simply start vim from the command line all the colors
> work the way i want. However, when i start a reply (and i
> should be using the same vimrc), i have different colors.


I'm using just 

set editor="~/bin/vim"

in my .muttrc and I use autocmds in my .vimrc to recognize 
replies with quoted text or no quoted text, new
messages and postponed messages. These make use of some of Sven
Guckes macros for deleting quote signs (> ) from empty lines etc.
I'm also working with set insertmode, so I don't have to type i
to input text. 

> augroup mutt
> au!
> 
> autocmd BufRead /tmp/mutt* set tw=65
> 
> " reply, quoting message
> autocmd BufRead /tmp/mutt* if getline(1) =~ '^On.*wrote:$'
> autocmd BufRead /tmp/mutt*    normal \cq1Go
> autocmd BufRead /tmp/mutt* set formatoptions=tcq2
> 
> " new message, reply without quoting
> autocmd BufRead /tmp/mutt* elseif (getline(1) =~ '^$')
> autocmd BufRead /tmp/mutt*      set insertmode
> 
> " postponed message
> autocmd BufRead /tmp/mutt* else
> autocmd BufRead /tmp/mutt*      1
> autocmd BufRead /tmp/mutt* endif

> autocmd BufRead ~/.muttrc    map <F1> :!less 
>/home/af/lang/bin/doc/mutt/manual.txt<CR>
> 
> augroup END 

One gripe I had was the way mutt adds an empty line when 
set nosig_dashes
or is it the other way round? This messes up some of these
autocmds. 

Incidentally the manual says: 

        It is strongly recommended that you not unset this variable (ie
        set nosig_dashes) unless your ``signature'' contains just your
        name.

Shouldn't this 'unless' be 'if.'
-- 
Greg Matheson
Chinmin College, Taiwan
[EMAIL PROTECTED]

Reply via email to