Hi,
* Lawrence Mitchell <[EMAIL PROTECTED]> [010512 14:18]:
> Using vim as an editor, I came up with this:
> "change double-quoted text to RFC 2646 format
> autocmd BufNewFile,BufRead .followup,.letter,mutt*,nn.*,snd.*
> :%s/^>\(.*>\)/>\1/
> The command on one line of course, hope that helps
FYI, I wrote a vim function which removes spaces between '>' marks
regardless of the quote level. If you're using Vim60, it will be useful
to have this script in your plugin directory ($HOME/.vim/plugin etc.)
It'll automatically be invoked when Mutt launches Vim.
------------------------8<------------------------8<------------------------
" Remove spaces between '>' marks when quoting
aug mutt
au! BufNewFile,BufRead mutt-* call QuoteRight()
aug END
fun! QuoteRight()
let curline = 1
while (curline <= line('$'))
if getline(curline) =~ '^>.*>'
exec "normal " curline . 'G'
exec "normal ^"
while col('$') - col('.') > 1
exec "normal l"
if (getline('.')[col('.')]) =~ '\w'
break
elseif (getline('.')[col('.') - 1]) =~ '\s'
\ && (getline('.')[col('.')]) !~ '[*:]'
exec "normal x"
endif
endwhile
endif
let curline = curline + 1
endwhile
endfun
------------------------8<------------------------8<------------------------
Not tested much but it should work. Please change it freely.
Regards.
--
Madoka Machitani <[EMAIL PROTECTED]>
Doshisha University, Kyoto. Faculty of Letters