On 2002.01.24, in <[EMAIL PROTECTED]>,
        "David T-G" <[EMAIL PROTECTED]> wrote:
> Matthew, et al --
> 
> ...and then David Champion said...
> % 
> % set editor="vi '+/^-- $/;,$d'"
> 
> Note that this will actually strip your signature and not that of the
> original email.
> 
> Given your macro example above, I deduce that your $indent_string="> "
> and so your $editor command should probably look about like
> 
>   set editor="vi '+/^> -- $/;d}'"

Oops. Mea culpa; pre-frontal cortex on holiday.

I'm not sure that this command will work, though. (It doesn't in
straight vi, because "d}" is vi syntax, but initialization commands need
to be ed or ex commands.)

I'm liking
        set editor="vi '+/^[>%] -- $/;,/^[^>%]*/d'"
right now. It handles David's quotation character, too. :)

+               begin vi init command
/^[>%] -- $/    search for a quoted signature indicator
;               separate first init command from second
,               create a range from the current location up to...
/^[^>%]*/       ... the next occurrence of an unquoted line
d               then delete that range

-- 
 -D.    [EMAIL PROTECTED]        NSIT    University of Chicago

Reply via email to