🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
14 messages
14 total messages Started by SINNER Sat, 31 May 2003 16:39
PING: Blinky - [slrn] and vim
#125677
Author: SINNER
Date: Sat, 31 May 2003 16:39
26 lines
1863 bytes
I have been using that little Bufread command in my ~/.vimrc that you
kindly shared some time back:

"Clean the article au BufRead ~/.followup :% s/^>\A*$//

Can you help me to understand what is going on here? I tried :help
bufread and :help au 

but the part I am having a problem deciphering is after the filename.
It gets rid of lines that contain only a number:

35

as above, it also removes 'separators' as:

=======================================================

So perhaps understanding it can help me to alter it to my needs. Thanks
again for sharing!

-- 
David
If Microsoft built cars, the Linux car owners would get expensive
Microsoft upgrades to their cars, which would make their cars run much
slower.
Re: PING: Blinky - [slrn] and vim
#125685
Author: Blinky the Shark
Date: Sat, 31 May 2003 19:19
37 lines
2024 bytes
SINNER wrote:

> I have been using that little Bufread command in my ~/.vimrc that you
> kindly shared some time back:

> "Clean the article au BufRead ~/.followup :% s/^>\A*$//

> Can you help me to understand what is going on here? I tried :help
> bufread and :help au 

> but the part I am having a problem deciphering is after the filename.
> It gets rid of lines that contain only a number:

<missing in action>

> as above, it also removes 'separators' as:

<poof!>

> So perhaps understanding it can help me to alter it to my needs.
> Thanks again for sharing!

It's supposed to remove any lines that contain greater-thans but no
alpha characters, and does.  Looks like the \A* is saying "no alpha
characters" (NOT one or more).  The form is: substitute/forthis/this/.
So:

sub / for lines starting with ">" and having no letters / nothing /

^ = beginning of line
$ = end of line

-- 
Blinky                        Linux Registered User 297263
esr on SCO Suit:                  http://snurl.com/esr_sco
About Spam And "Remove Me"       http://snurl.com/removeme 
Re: PING: Blinky - [slrn] and vim
#125689
Author: SINNER
Date: Sat, 31 May 2003 20:00
24 lines
2003 bytes
While strolling through news.software.readers, Blinky the Shark was overheard plotting:

> It's supposed to remove any lines that contain greater-thans but no
> alpha characters, and does.  Looks like the \A* is saying "no alpha
> characters" (NOT one or more).  The form is: substitute/forthis/this/.
> So:

> sub / for lines starting with ">" and having no letters / nothing /

> ^ = beginning of line
> $ = end of line

Thanks!

By changing it to 
au BufRead ~/.followup :% s/^>$//

I get the desired effect.

-- 
David
Gravity:
	What you get when you eat too much and too fast.
Re: PING: Blinky - [slrn] and vim
#125692
Author: Blinky the Shark
Date: Sat, 31 May 2003 20:52
33 lines
1944 bytes
SINNER wrote:

> While strolling through news.software.readers, Blinky the Shark was overheard plotting:

>> It's supposed to remove any lines that contain greater-thans but no
>> alpha characters, and does.  Looks like the \A* is saying "no alpha
>> characters" (NOT one or more).  The form is: substitute/forthis/this/.
>> So:

>> sub / for lines starting with ">" and having no letters / nothing /

>> ^ = beginning of line
>> $ = end of line

> Thanks!

I live to serve.  :)

> By changing it to 
> au BufRead ~/.followup :% s/^>$//

> I get the desired effect.

What's it do with this (which you'd see with empty lines that have been
quoted more than once by the time you entered the thread?

>>>>

-- 
Blinky                        Linux Registered User 297263
esr on SCO Suit:                  http://snurl.com/esr_sco
About Spam And "Remove Me"       http://snurl.com/removeme 
Re: PING: Blinky - [slrn] and vim
#125696
Author: SINNER
Date: Sat, 31 May 2003 21:39
19 lines
1877 bytes
While strolling through news.software.readers, Blinky the Shark was overheard plotting:


>> By changing it to 
>> au BufRead ~/.followup :% s/^>$//

>> I get the desired effect.

> What's it do with this (which you'd see with empty lines that have been
> quoted more than once by the time you entered the thread?

>>>>>

Hrumph! It leaves them there!

-- 
David
Yes, but which self do you want to be?
Re: PING: Blinky - [slrn] and vim
#125699
Author: SINNER
Date: Sat, 31 May 2003 22:10
36 lines
2267 bytes
While strolling through news.software.readers, Blinky the Shark was overheard plotting:

> What's it do with this (which you'd see with empty lines that have been
> quoted more than once by the time you entered the thread?

<poof!>

Changed to:

au BufRead ~/.followup :% s/^>*$//

still keeps lines like

99

and

===

but gets rid of

>>>>>

Mega trial and error and of course the most obvious one was the last one
I tried. I am sitting here reading through Pattern Matching in 'Linux in
a nutshell' but I could not find a reference that worked. Anyway it
works now, thanks again!
-- 
David
"The great Morpheus. We meet at last."
"And you are."
"A Smith. Agent Smith."
"You all look the same to me."

		-- Agent Smith and Morpheus, "The Matrix"
Re: PING: Blinky - [slrn] and vim
#125701
Author: W. Citoan
Date: Sat, 31 May 2003 22:25
42 lines
1909 bytes
On Sat, 31 May 2003 22:10:22 GMT, SINNER wrote:
>  While strolling through news.software.readers, Blinky the Shark was overheard plotting:
>  
> > What's it do with this (which you'd see with empty lines that have been
> > quoted more than once by the time you entered the thread?
>  
>  <poof!>
>  
>  Changed to:
>  
>  au BufRead ~/.followup :% s/^>*$//
>  
>  still keeps lines like
>  
>  99
>  
>  and
>  
>  ===
>  
>  but gets rid of
>  
> >>>>>
>  
>  Mega trial and error and of course the most obvious one was the last one
>  I tried. I am sitting here reading through Pattern Matching in 'Linux in
>  a nutshell' but I could not find a reference that worked. Anyway it
>  works now, thanks again!

Okay, but try this line:

> > >

I think you need

au BufRead ~/.followup :% s/^>[ >]*$//

- W. Citoan
-- 
Reserve your abuse for your true friends.
             -- Larry Wall in <199712041852.KAA19364@wall.org>
Re: PING: Blinky - [slrn] and vim
#125703
Author: Blinky the Shark
Date: Sat, 31 May 2003 23:12
21 lines
1715 bytes
SINNER wrote:

> While strolling through news.software.readers, Blinky the Shark was overheard plotting:

>>> By changing it to 
>>> au BufRead ~/.followup :% s/^>$//

>>> I get the desired effect.

>> What's it do with this (which you'd see with empty lines that have been
>> quoted more than once by the time you entered the thread?

> Hrumph! It leaves them there!

That's why I tweaked the code.  :)

-- 
Blinky                        Linux Registered User 297263
esr on SCO Suit:                  http://snurl.com/esr_sco
About Spam And "Remove Me"       http://snurl.com/removeme 
Re: PING: Blinky - [slrn] and vim
#125704
Author: Blinky the Shark
Date: Sat, 31 May 2003 23:16
41 lines
2087 bytes
SINNER wrote:
> While strolling through news.software.readers, Blinky the Shark was overheard plotting:

>> What's it do with this (which you'd see with empty lines that have been
>> quoted more than once by the time you entered the thread?

><poof!>

> Changed to:

> au BufRead ~/.followup :% s/^>*$//

> still keeps lines like

[numbers only]

> and

[equality signs]

> but gets rid of

[>>>>]

> Mega trial and error and of course the most obvious one was the last one
> I tried. I am sitting here reading through Pattern Matching in 'Linux in
> a nutshell' but I could not find a reference that worked. Anyway it
> works now, thanks again!

How's it do with:

> >> >

Some posters have slightly different ">" quoting, so that they're not
always contiguous.

-- 
Blinky                        Linux Registered User 297263
esr on SCO Suit:                  http://snurl.com/esr_sco
About Spam And "Remove Me"       http://snurl.com/removeme 
Re: PING: Blinky - [slrn] and vim
#125708
Author: SINNER
Date: Sun, 01 Jun 2003 00:13
28 lines
2258 bytes
While strolling through news.software.readers, W. Citoan was overheard plotting:

>>  Mega trial and error and of course the most obvious one was the last one
>>  I tried. I am sitting here reading through Pattern Matching in 'Linux in
>>  a nutshell' but I could not find a reference that worked. Anyway it
>>  works now, thanks again!

> Okay, but try this line:

<poof part deux>

> I think you need

> au BufRead ~/.followup :% s/^>[ >]*$//

> - W. Citoan

Indeed I did, Thank you.

-- 
David
"The great Morpheus. We meet at last."
"And you are."
"A Smith. Agent Smith."
"You all look the same to me."

		-- Agent Smith and Morpheus, "The Matrix"
Re: PING: Blinky - [slrn] and vim
#125710
Author: SINNER
Date: Sun, 01 Jun 2003 01:30
43 lines
2524 bytes
While strolling through news.software.readers, Blinky the Shark was overheard plotting:
> SINNER wrote:
>> While strolling through news.software.readers, Blinky the Shark was overheard plotting:

>>> What's it do with this (which you'd see with empty lines that have been
>>> quoted more than once by the time you entered the thread?

>><poof!>

>> Changed to:

>> au BufRead ~/.followup :% s/^>*$//

>> still keeps lines like

> [numbers only]

>> and

> [equality signs]

>> but gets rid of

>[>>>>]

>> Mega trial and error and of course the most obvious one was the last one
>> I tried. I am sitting here reading through Pattern Matching in 'Linux in
>> a nutshell' but I could not find a reference that worked. Anyway it
>> works now, thanks again!

> How's it do with:

[> >> >]

With what ;)

Actually had to change it _again_ as suggested in this thread, to:

au BufRead ~/.followup :% s/^>[ >]*$//
-- 
David
Rub my nipples as I torture this little piggy!
Re: PING: Blinky - [slrn] and vim
#125718
Author: Blinky the Shark
Date: Sun, 01 Jun 2003 02:42
59 lines
2737 bytes
SINNER wrote:
> While strolling through news.software.readers, Blinky the Shark was
> overheard plotting:
>> SINNER wrote:
>>> While strolling through news.software.readers, Blinky the Shark was
>>> overheard plotting:

>>>> What's it do with this (which you'd see with empty lines that have
>>>> been quoted more than once by the time you entered the thread?

>>><poof!>

>>> Changed to:

>>> au BufRead ~/.followup :% s/^>*$//

>>> still keeps lines like

>> [numbers only]

>>> and

>> [equality signs]

>>> but gets rid of

>>> Mega trial and error and of course the most obvious one was the last
>>> one I tried. I am sitting here reading through Pattern Matching in
>>> 'Linux in a nutshell' but I could not find a reference that worked.
>>> Anyway it works now, thanks again!

>> How's it do with:



> With what ;)

Nebber mind.  :)

> Actually had to change it _again_ as suggested in this thread, to:

> au BufRead ~/.followup :% s/^>[ >]*$//

Yeah, I've been watching.

Your mega trial and error just ran up against someone who'd done tera
trial and error.  (Or actually *knew* regex in the first place. I have
to relearn it every time I play around with it, it seems. <g>)

Now I shall reveal how it came to me, before *I* tweaked it for my
purposes <g>:

au BufRead ~/.followup :% s/^>\+ \+$//

-- 
Blinky                        Linux Registered User 297263
esr on SCO Suit:                  http://snurl.com/esr_sco
About Spam And "Remove Me"       http://snurl.com/removeme 
Re: PING: Blinky - [slrn] and vim
#125719
Author: SINNER
Date: Sun, 01 Jun 2003 04:10
30 lines
2551 bytes
While strolling through news.software.readers, Blinky the Shark was overheard plotting:


[snip]

> Your mega trial and error just ran up against someone who'd done tera
> trial and error.  (Or actually *knew* regex in the first place. I have
> to relearn it every time I play around with it, it seems. <g>)

I need to learn it a first time, seems to useful to pass up.

> Now I shall reveal how it came to me, before *I* tweaked it for my
> purposes <g>:

> au BufRead ~/.followup :% s/^>\+ \+$//

I am amazed every time I look at regex that something that looks as it
does, does the things that it does.

Did that make sense :/

<sentient sig active>
-- 
David
"Wha...what does that mean?"
"It doesn't mean anything."
"Everybody falls the first time. Right, Trin?"

		-- Mouse, Switch and Cypher, "The Matrix"
Re: PING: Blinky - [slrn] and vim
#125721
Author: Blinky the Shark
Date: Sun, 01 Jun 2003 04:35
29 lines
2137 bytes
SINNER wrote:

> While strolling through news.software.readers, Blinky the Shark was overheard plotting:

> [snip]

>> Your mega trial and error just ran up against someone who'd done tera
>> trial and error.  (Or actually *knew* regex in the first place. I have
>> to relearn it every time I play around with it, it seems. <g>)

> I need to learn it a first time, seems to useful to pass up.

>> Now I shall reveal how it came to me, before *I* tweaked it for my
>> purposes <g>:

>> au BufRead ~/.followup :% s/^>\+ \+$//

> I am amazed every time I look at regex that something that looks as it
> does, does the things that it does.

> Did that make sense :/

It does.  :)

-- 
Blinky                        Linux Registered User 297263
esr on SCO Suit:                  http://snurl.com/esr_sco
About Spam And "Remove Me"       http://snurl.com/removeme 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads