On 09-Aug-2000, Ronny Haryanto wrote:
> > >   au BufRead * normal :g/^> -- $/,/^$/-1d<CR><C-L>gg
>
> Ugh, sorry about that. The <C-L> was meant to be Ctrl-L which clears
> the screen after vim complains if it cannot find quoted signature.
> Apparently the <...> construct doesn't work in this case (any vimmers
> here willing to explain?), try inserting a literal CR (press Ctrl-V
> followed by Enter) and a literal Ctrl-L (press Ctrl-V followed by
> Ctrl-L).

Michael Geddes from the vim list corrected the above (Thanks!):
au BufRead * exe "normal :g/^> -- $/,/^$/-1d\<CR>\<C-L>gg"

> The above method assumes that you use $signature and $sig_dashes so
> that there's a blank line after the quoted mail and your own
> signature. I should have mentioned this earlier.

If you don't use sig and sig_dashes (like me), you can use:
au BufRead * exe "normal :g/^> -- $/,$d\<CR>\<C-L>gg"

Ronny

Reply via email to