On Wed, Aug 22, 2001 at 07:56:34PM +0200, Azzazel wrote:
> Hi,
> 
> How can I set mutt to automaticly delete everything after "-- "
> [dash dash space]. It's very usefull when replying a message to
> yahoogroups (their adds are automaticly removed).

I wrote a little script (attached) called mutt-vim which does this for me,
along with setting various other vim options (you'll want to change
those). You'll have to set editor="mutt-vim" in order to call the script,
of course. :-)

LateR!
js.
-- 
Jean-Sebastien Morisset, Sr. UNIX Administrator <[EMAIL PROTECTED]>
Personal Homepage <http://jsmoriss.mvlan.net/>; UNIX, Internet, 
Homebrewing, Cigars, PCS, PalmOS, CP2020 and other Fun Stuff...
This is Linux Country. On a quiet night you can hear Windows NT reboot!
#!/bin/sh

clear
umask 077

Vim () {
        vim "+set nonu" "+set wm=6" "+set ai" "+set ts=8" $*
}

# strip signatures
if [ -x "`which gawk 2>/dev/null`" -a -s "$1" ]
then
        gawk '{ 
                if ($0 ~ /^> --( ?|--*)$/) { 
                        while ($0 !~ /^(> |)$/) { getline }
                }
                print $0 > OUTFILE
        }' OUTFILE=$1.out $1
        mv $1.out $1
fi

case $LOGNAME in
        root|jsmoriss)
                case $SSH_CLIENT in
                        "10.1.1.120 "*) stty cols 80; Vim $*; stty cols 132 ;;
                        "38.144."*)     stty cols 80; Vim $*; stty cols 132 ;;
                        "64."*) stty cols 80; Vim $*; stty cols 132 ;;
                        *)      Vim $* ;;
                esac
                ;;
        *)      Vim $* ;;
esac

PGP signature

Reply via email to