Article View: news.software.readers
Article #165531Re: vim macro for [slrn] -was- Re: Way to remove ad sig?
From: PJR
Date: Mon, 18 Apr 2005 19:08
Date: Mon, 18 Apr 2005 19:08
63 lines
4093 bytes
4093 bytes
On Sunday 17 April 2005, W. Citoan wrote in news.software.readers:
> Blinky the Shark wrote:
>> W. Citoan wrote:
>>
>> > Blinky the Shark wrote:
>>
>> >> >:nmap <F9> gg/^>-- <CR>maG?^-- <CR>kv`ad
>>
>> >> That works for this kind of quoting: >--
>>
>> >> But if quoting editor adds a space: > --
>>
>> >> the macro doesn't pick it up. Anyone got a simple tweak for
>> >> making it find either style of quoting with its first search?
>>
>> > :nmap <F9> gg/^>\s\=-- <CR>maG?^-- <CR>kv`ad
>>
>> > Will match 0 or 1 spaces between the ">" and "-".
>>
>> > If you want to match more than 1, change the "\=" to "*" for any
>> > number of whitespace characters or replace it with "\{,m}" where m
>> > (your choice of actual number) is the maximum number to match if you
>> > want to limit it.
>>
>> And note that I wrote the original, there, per a request for deleting
>> from the first once-quoted sig delimiter, as requested. Here, if
>> it's a *valid* sig delimiter, then it should not be present. I think
>> requester may have meant the first *invalid* sig delimiter (probably
>> "--[NO space]". If so first search should not include the space
>> after the pair of hyphens. Can't check for *all* of the *in*valid
>> not-delimiters that bozos come up with instead of real ones.
>
> I took it as the original sig deliminator was valid, but the quoting
> newsreader didn't properly remove it, but as I've seen both:
>
> :nmap <F9> gg/^\(>\s\=\)\+--\s\=<CR>maG?^-- <CR>kv`ad
>
> That should match both cases as well as cases with multiple levels of
> quoting (i.e. ">>--" and variations with spacing).
Thank you both for your help.
In fact, I want to remove only the last valid signature that I've
quoted with "> ". Slrn automatically removes only the last of two
consecutive valid signatures, as happens when a news provider adds a
signature after the poster's. I also want to avoid snipping my own
sign-off line, and to move the cursor back to the top. This seems to
have the desired effect:
:nmap <F9> <C-End>?^> -- \n<CR>vG/^PJR :-)<CR>2k$<Del>:noh<CR>gq${j
The next step is to set .slrnrc up so that this works automatically
except when I want to quote headers and signatures.
Thanks again. I was getting nowhere with my own experiments.
PJR :-)
--
alt.usenet.kooks award-winners and FAQ:
http://www.insurgent.org/~kook-faq/
[To reply by email, remove "NOSPAM".]
Technical Details
Message-ID:
<slrnd681ci.ahc.pjr@nntp.petitmorte.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.ams.giganews.com!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed2.easynews.com!easynews.com!easynews!news.alt.net!nntp.petitmorte.net!newsReferences:
<Xns9634AA90AC0A8sultanofcyberhotmail@38.119.71.210> <slrnd5j8tt.5jc.no.spam@thurston.blinkynet.net> <Xns9634C961159B8sultanofcyberhotmail@38.119.71.210> <slrnd5jk5r.92e.dcmoose@moosemeat.ca.INVALID> <slrnd5loeq.4bf.pjr@nntp.petitmorte.net> <slrnd5lpre.564.no.spam@thurston.blinkynet.net> <slrnd5lsfi.4bf.pjr@nntp.petitmorte.net> <slrnd5lvqg.564.no.spam@thurston.blinkynet.net> <slrnd5m2j2.4bf.pjr@nntp.petitmorte.net> <slrnd5m3do.eo7.no.spam@thurston.blinkynet.net> <slrnd5m70r.4bf.pjr@nntp.petitmorte.net> <slrnd61ipg.g3c.no.spam@thurston.blinkynet.net> <slrnd62ul0.sar.no.spam@thurston.blinkynet.net> <slrnd63d0f.19g.wcitoan@wcitoan-via.supernews.com> <slrnd63l6j.5b2.no.spam@thurston.blinkynet.net> <slrnd6552j.31g.wcitoan@wcitoan-via.supernews.com>Show Full Headers
Complete Article Headers
Message-ID: <slrnd681ci.ahc.pjr@nntp.petitmorte.net> Subject: Re: vim macro for [slrn] -was- Re: Way to remove ad sig? Date: Mon, 18 Apr 2005 20:08:02 +0100 From: PJR <pjr@NOSPAMinsurgent.org> References: <Xns9634AA90AC0A8sultanofcyberhotmail@38.119.71.210> <slrnd5j8tt.5jc.no.spam@thurston.blinkynet.net> <Xns9634C961159B8sultanofcyberhotmail@38.119.71.210> <slrnd5jk5r.92e.dcmoose@moosemeat.ca.INVALID> <slrnd5loeq.4bf.pjr@nntp.petitmorte.net> <slrnd5lpre.564.no.spam@thurston.blinkynet.net> <slrnd5lsfi.4bf.pjr@nntp.petitmorte.net> <slrnd5lvqg.564.no.spam@thurston.blinkynet.net> <slrnd5m2j2.4bf.pjr@nntp.petitmorte.net> <slrnd5m3do.eo7.no.spam@thurston.blinkynet.net> <slrnd5m70r.4bf.pjr@nntp.petitmorte.net> <slrnd61ipg.g3c.no.spam@thurston.blinkynet.net> <slrnd62ul0.sar.no.spam@thurston.blinkynet.net> <slrnd63d0f.19g.wcitoan@wcitoan-via.supernews.com> <slrnd63l6j.5b2.no.spam@thurston.blinkynet.net> <slrnd6552j.31g.wcitoan@wcitoan-via.supernews.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.ams.giganews.com!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed2.easynews.com!easynews.com!easynews!news.alt.net!nntp.petitmorte.net!news Newsgroups: news.software.readers Organization: Alcatroll Labs Inc. (Executive Vice-President) Lines: 63 X-Irony-Meter: Alcatroll Kookproofer 1.3.3.7 X-Irony-Meter-Setting: Maximum User-Agent: slrn/0.9.8.1 (Debian)