Sunday, August 30, 2009

Re: Replace Just Needed

On Sat, Aug 29, 2009 at 09:57:58PM +0800, bill lam wrote:
> I added a vim macro inside ~/.vimrc
>
> function! Tofu()
> call search('^$')
> if 1 < line(".")
> 2,/^$/-1!sed -e 's/^> //' | t-prot -(your options here) | sed -e 's/^/> /'
> +/^$/
> endif
> endfunction

Hi Bill,

Thanks for this snippet, works perfectly for me.

> and set editor variable inside ~/.muttrc
>
> set editor="vim -c \"set spell tw=70 et\" \"+silent! call Tofu()\""

I added it to ~/.vim/after/ftplugin/mail.vim where I keep the
other mail stuff.

> The extra search in Tofu() is for positioning cursor to just before my
> signature when replying.
>
> Or you may prefer to call Tofu() manually. ymmv
>
> With t-prot, I actually like top posting. ;-)

;-)

> --
> regards,

Thanks again,
Simon
--
+ privacy is necessary
+ using http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

No comments: