On 09-Aug-2000, Leonid Mamtchenkov wrote:
>   First, I have wrote the perl script (find attached) that removes
> signatures from the passed file and saves the resulting file in the same
> place.

If you use vim, you can do either:

- put this in your muttrc:
        set editor = "vi +'/^[ ,\t]*> -- /,/^-- /-2d'"
  or,
- muttrc:
        set editor = "vi -u ~/.vimrc-mutt"
  and in ~/.vimrc-mutt:
        source ~/.vimrc
        set ft=mail
        au BufRead * normal :g/^> -- $/,/^$/-1d<CR><C-L>gg

>   Then, I have wrote a shell script, which basically is just a call to my
> script, and then a call to my editor.

Your perl script can be simplified to a one-liner:

        #!/usr/bin/perl -i -pe 'exit(0) if(/^> -- $/)'

Cheers,

Ronny

Reply via email to