Re: Automatically truncating signatures
On 2007-04-07, Michael Pobega <pobega@xxxxxxxxx> wrote:
> On Sat, Apr 07, 2007 at 10:35:41AM +0200, Elimar Riesebieter wrote:
> > On Fri, 06 Apr 2007 the mental interface of
> > Michael Pobega told:
> >
> > >I'm using Vim as my text editor and I've yet to figure out a good way
> > >to automatically truncate everything below the signature line (----)
> > >when I reply to a message.
> > >
> > >I'd like to do this because I'd like to start using a signature in my
> > >messages, and having to get rid of all of the signatures and automated
> > >mailing list messages on every message manually is a bit irritating.
> >
> > Deletes everything from cursor line position till the last --
> > (<dash><dash><blank>):
> > map ,ds :.;/^-- $/d<CR>O<home>-- <ESC><right>d<End>I<CR><CR><UP><UP>
> >
> > Elimar
> >
>
> I don't understand how to use that. I put it in my .vimrc and it's not
> working, I tried:
>
> (-- ):<stuff>
> -- :<stuff>
> :<stuff>
>
> But none of it works right. Am I putting it in the wrong place?
All you need is <stuff>. His "(<dash><dash><blank>):" was a
parenthetical clarification of his preceding word, "-- ", so that
you knew that a proper signature delimiter is just that: two dashes
followed by a single space.
To execute his macro after defining it in your .vimrc, just type
,ds
HTH,
Gary
--
Gary Johnson | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx | Mobile Broadband Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA