🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
55 messages
55 total messages Page 2 of 2 Started by R. Heffels Thu, 10 Apr 2003 17:49
Page 2 of 2 • 55 total messages
Re: [OT] slrn script (WAS) ATTN Luu Tran, author of X-News ...
#123543
Author: SINNER
Date: Sun, 20 Apr 2003 16:00
37 lines
3692 bytes
While strolling through news.software.readers, Blinky the Shark was overheard plotting:
> Blinky the Shark wrote:
>> SINNER wrote:
>>> While strolling through news.software.readers, Blinky the Shark was
>>> overheard plotting:

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

>>>>> This goes in ~/.vimrc ?

>>>> Should work.  .gcimrc here.

>>> Works great! It does give an error if I re edit or at the end of spell
>>> checking because it doesn't find any to replace. Does not effect
>>> operation though.

>> I have another one keymapped, that puts a blank line after the new
>> attribution slrn adds before passing the doc to vim.  I like blank lines
>> between attributions, and generally add one after it, manually (as in
>> the blank line after "SINNER wrote:", above.  I'd play around with
>> adding this macro code to what I posted, but it has one aggravating
>> drawback: after it's done, it leaves a highlight (bright yello, here) at
>> the beginning of every blank line, and I haven't figured out a way to
>> turn that off.  It's rather ugly.  For the record, here's that macro:

>> " keybinding: put a newline after slrn's followup attribution au
>> BufNewFile,BufRead ~/.followup :nmap <F4> gg/^$<CR><CR>$I<End><CR>

> Accidentally wrapped: begins with "au".

either i dont understand what it does, or it didnt work on your last
post. as above.

-- 
David
Do something unusual today.  Pay a bill.
Re: [OT] slrn script (WAS) ATTN Luu Tran, author of X-News ...
#123557
Author: Blinky the Shark
Date: Sun, 20 Apr 2003 18:03
43 lines
3586 bytes
SINNER wrote:

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

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

>>>>>> This goes in ~/.vimrc ?

>>>>> Should work.  .gcimrc here.

>>>> Works great! It does give an error if I re edit or at the end of spell
>>>> checking because it doesn't find any to replace. Does not effect
>>>> operation though.

>>> I have another one keymapped, that puts a blank line after the new
>>> attribution slrn adds before passing the doc to vim.  I like blank lines
>>> between attributions, and generally add one after it, manually (as in
>>> the blank line after "SINNER wrote:", above.  I'd play around with
>>> adding this macro code to what I posted, but it has one aggravating
>>> drawback: after it's done, it leaves a highlight (bright yello, here) at
>>> the beginning of every blank line, and I haven't figured out a way to
>>> turn that off.  It's rather ugly.  For the record, here's that macro:

>>> " keybinding: put a newline after slrn's followup attribution au
>>> BufNewFile,BufRead ~/.followup :nmap <F4> gg/^$<CR><CR>$I<End><CR>

>> Accidentally wrapped: begins with "au".

> either i dont understand what it does, or it didnt work on your last
> post. as above.

Dunno.

-- 
Blinky                       Linux Registered User 297263
New April 7 -- Arab TV This Week: http://snurl.com/arabtv
New April 6 -- The Big Game: http://snurl.com/thegame
New April 4 -- The Real WinXP: http://snurl.com/xp_review
Re: [OT] slrn script (WAS) ATTN Luu Tran, author of X-News ...
#123624
Author: Walter Dnes
Date: Mon, 21 Apr 2003 17:41
66 lines
4199 bytes
On Sat, 19 Apr 2003 03:00:06 GMT, SINNER, <99nesorjd@gates_of_hell.INVALID> wrote:
>  While strolling through news.software.readers, Blinky the Shark was overheard plotting:
> > 
> > If you had any, we might have seen it by now.
> > 
>  
>  nb: Would you consider sharing that macro that edits the quote marks, it
>  makes it look really clean /me likes :)

   I've got a few that might be of interest.  There'e some perl in them.
Here they are.  *IMPORTANT*
   1) These work when vim is invoked with "-N", the non-vi-compable mode
   2) Where you see "^M", type <CTRL-V><CTRL-M> in the mapping

map <F12> :'a,.s/^/> /^M
   - This one puts "> " in front of a range of lines.  It does not wrap
     or reformat the lines.  Go to one end of the range of lines, and
     type "ma" (without the quotes) to mark-a.  Go to the other end of
     the range and hit <F12>

map <F10> gq'a
   - This one reformats a range of lines to default margins.  "ma" at
     one end and <F10> at the other end

map <F9> !'a/home/waltdnes/bin/q/q0^M
   - This one takes a range of lines with *ONE LEVEL OF QUOTES*, and
     reformats it *AND RESTORES THE QUOTES*.  This is beyond mere vim;
     I had to use perl.  Here's /home/waltdnes/bin/q (replace with the
     appropriate name for your home dir.  Does "~" work here ?)

-rwx------    1 waltdnes users          57 Mar 29 17:20 q0
-rwx------    1 waltdnes users         145 Mar 29 17:20 q1
-rwx------    1 waltdnes users          55 Mar 29 17:20 q2

     Here's q0
#!/bin/bash
/home/waltdnes/bin/q/q1|fmt -w71|/home/waltdnes/bin/q/q2

     Here's q1
#!/usr/bin/perl -w
use strict;
my $line = "";
while (<STDIN>)
{
$line = $_;
if ($line eq ">\n"){$line = "\n"};
$line =~ s/^> //;
print $line;
};

     Here's q2
#!/usr/bin/perl -w
while (<STDIN>) {print "> " . $_;};

   A short explanation.  q0 is a shell script
   - q0 invokes q1, a perl script that strips off the leading quotes
   - q0 pipes the output from q1 to "fmt -w71" which reformats the text
   - q0 pipes the reformatted text to q2, a perl script that sticks
     leading "> " in front of each line

-- 
Walter Dnes <waltdnes@waltdnes.org>
Email users are divided into two classes;
1) Those who have effective spam-blocking
2) Those who wish they did
Re: [OT] slrn script (WAS) ATTN Luu Tran, author of X-News ...
#123626
Author: SINNER
Date: Mon, 21 Apr 2003 17:59
17 lines
2810 bytes
While strolling through news.software.readers, Walter Dnes was overheard plotting:
>    I've got a few that might be of interest.  There'e some perl in them.
> Here they are.  *IMPORTANT*
>    1) These work when vim is invoked with "-N", the non-vi-compable mode
>    2) Where you see "^M", type <CTRL-V><CTRL-M> in the mapping

[snip the goodies]

Thanks Walter!

-- 
David
Fortune finishes the great quotations, #21

	Shall I compare thee to a Summer day?
	No, I guess not.
Page 2 of 2 • 55 total messages
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