🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
21 messages
21 total messages Started by Lawrence Haber Sun, 13 Jul 2003 11:33
SLRN: choice of editor and word wrapper
#128504
Author: Lawrence Haber
Date: Sun, 13 Jul 2003 11:33
11 lines
1655 bytes
I would appreciate hearing from folks on their thoughts for the best
combination of an editor to use with SLRN and a program that will wrap or
re-wrap text so that it is intelligible once it goes out.

I am currently using JED and an not sure about what/how to wrap text


TIA,

Larry Haber
Re: SLRN: choice of editor and word wrapper
#128508
Author: SINNER
Date: Sun, 13 Jul 2003 14:20
21 lines
2194 bytes
Lawrence Haber Wrote in news.software.readers, on Sun, 13 Jul 2003 11:33:18 GMT:
> I would appreciate hearing from folks on their thoughts for the best
> combination of an editor to use with SLRN and a program that will wrap or
> re-wrap text so that it is intelligible once it goes out.

> I am currently using JED and an not sure about what/how to wrap text


I didnt realize there was another editor besides vim ;)

set editor_command "vim -f '+set tw=72' +%d '%s'"

for any lines that are not wrapped correctly for whatever reason (The
above should make your lines wrap at 72) you can SHIFT-V which will put
you in visual mode and select full lines and then SHIFT-Q to re wrap
poorly wrapped text.

-- 
David
Make the coupling between modules visible.
            - The Elements of Programming Style (Kernighan & Plaugher)
Re: SLRN: choice of editor and word wrapper
#128514
Author: Andrew Preater
Date: Sun, 13 Jul 2003 17:57
30 lines
2040 bytes
* SINNER <99nesorjd@gates_of_hell.INVALID>:
> Lawrence Haber Wrote:
>> I am currently using JED and an not sure about what/how to wrap
>> text

Well, I used to use jed as my editor in slrn, there defintely was a
way to re-wrap quoted text to the usual 72 characters... sorry to say
I've forgotten all about it since I learned the basics of vim.  Vim is
a good habit, you really should try it! :)

> set editor_command "vim -f '+set tw=72' +%d '%s'"

I skip the '+set tw=72', because I use:

au FileType mail set tw=70

Which is just what I want for mail & news.

> you can SHIFT-V which will put you in visual mode and select full
> lines and then SHIFT-Q to re wrap poorly wrapped text.

I go for good old gqap or gqip.  I recall some discussion in n.s.r
about reformatting everything in a message body (i.e. not signature or
headers) in vim.  This was what was suggested for your vimrc:

map <f5> gg/^$<CR>V/^-- $<CR>{gq`^

-- 
Andrew Preater
Re: SLRN: choice of editor and word wrapper
#128517
Author: Blinky the Shark
Date: Sun, 13 Jul 2003 19:43
36 lines
2367 bytes
Andrew Preater wrote:

> * SINNER <99nesorjd@gates_of_hell.INVALID>:
>> Lawrence Haber Wrote:
>>> I am currently using JED and an not sure about what/how to wrap
>>> text

> Well, I used to use jed as my editor in slrn, there defintely was a
> way to re-wrap quoted text to the usual 72 characters... sorry to say
> I've forgotten all about it since I learned the basics of vim.  Vim is
> a good habit, you really should try it! :)

>> set editor_command "vim -f '+set tw=72' +%d '%s'"

> I skip the '+set tw=72', because I use:

> au FileType mail set tw=70

> Which is just what I want for mail & news.

>> you can SHIFT-V which will put you in visual mode and select full
>> lines and then SHIFT-Q to re wrap poorly wrapped text.

> I go for good old gqap or gqip.  I recall some discussion in n.s.r
> about reformatting everything in a message body (i.e. not signature or
> headers) in vim.  This was what was suggested for your vimrc:

> map <f5> gg/^$<CR>V/^-- $<CR>{gq`^

That's what I use (source: Tim Hammerquist (very slightly tweaked)) with
gvim.  Does a great job.  Map it where convenient.

-- 
Blinky                              Linux RU 297263
Spam: The Boulder Pledge   http://snurl.com/boulder
All In The Family      http://snurl.com/familything
Re: SLRN: choice of editor and word wrapper
#128522
Author: Blinky the Shark
Date: Sun, 13 Jul 2003 20:24
12 lines
1538 bytes
Blinky the Shark wrote:

> That's what I use (source: Tim Hammerquist (very slightly tweaked)) with
> gvim.  Does a great job.  Map it where convenient.

Uhh...no, I didn't mean that I slightly tweaked Tim or that he was
inherently slightly tweaked.  :)

-- 
Blinky                              Linux RU 297263
Spam: The Boulder Pledge   http://snurl.com/boulder
All In The Family      http://snurl.com/familything
Re: SLRN: choice of editor and word wrapper
#128523
Author: Holger Lillqvist
Date: Sun, 13 Jul 2003 20:28
19 lines
1880 bytes
Lawrence Haber wrote:

> I would appreciate hearing from folks on their thoughts for the best
> combination of an editor to use with SLRN and a program that will wrap or
> re-wrap text so that it is intelligible once it goes out.

> I am currently using JED and an not sure about what/how to wrap text

You're looking for the jed function format_paragraph. What emulation
of jed do you use? With emacs-like keybindings, it is esc-q.

There also exist a couple of mailmodes for jed, which lets you reformat
quoted text, etc. Google for details.

So there is no need to change editor just to get wrapping work ok..
Jed is a slim but extremely powerful editor. I have tried many other
editors, among others emacs and vim, but settled for jed.

Holger
Re: SLRN: choice of editor and word wrapper
#128532
Author: SINNER
Date: Mon, 14 Jul 2003 02:00
19 lines
2024 bytes
Andrew Preater Wrote in news.software.readers, on Sun, 13 Jul 2003 18:57:21 +0100:

[...]

>> you can SHIFT-V which will put you in visual mode and select full
>> lines and then SHIFT-Q to re wrap poorly wrapped text.

> I go for good old gqap or gqip.  I recall some discussion in n.s.r
> about reformatting everything in a message body (i.e. not signature or
> headers) in vim.  This was what was suggested for your vimrc:

> map <f5> gg/^$<CR>V/^-- $<CR>{gq`^

Thanks! Added.

-- 
David
If Microsoft built cars, you would have to press the "Start" button to turn
them off.
Re: SLRN: choice of editor and word wrapper
#128538
Author: Mike Vanecek
Date: Mon, 14 Jul 2003 04:17
20 lines
1641 bytes
On Mon, 14 Jul 2003 02:00:35 GMT, SINNER wrote:
> Andrew Preater Wrote in news.software.readers, on Sun, 13 Jul 2003 18:57:21 +0100:
> 
> [...]
> 
>>> you can SHIFT-V which will put you in visual mode and select full
>>> lines and then SHIFT-Q to re wrap poorly wrapped text.
> 
>> I go for good old gqap or gqip.  I recall some discussion in n.s.r
>> about reformatting everything in a message body (i.e. not signature or
>> headers) in vim.  This was what was suggested for your vimrc:
> 
>> map <f5> gg/^$<CR>V/^-- $<CR>{gq`^

Got an error when I tried to use it. Would someone please decode the
map. I tried to debug it, but obviously did not understand the map
syntax in spite of reading man.

Thanks.
 
Re: SLRN: choice of editor and word wrapper
#128546
Author: Blinky the Shark
Date: Mon, 14 Jul 2003 06:35
41 lines
2498 bytes
Mike Vanecek wrote:

> On Mon, 14 Jul 2003 02:00:35 GMT, SINNER wrote:
>> Andrew Preater Wrote in news.software.readers, on Sun, 13 Jul 2003 18:57:21 +0100:

>> [...]

>>>> you can SHIFT-V which will put you in visual mode and select full
>>>> lines and then SHIFT-Q to re wrap poorly wrapped text.

>>> I go for good old gqap or gqip.  I recall some discussion in n.s.r
>>> about reformatting everything in a message body (i.e. not signature or
>>> headers) in vim.  This was what was suggested for your vimrc:

>>> map <f5> gg/^$<CR>V/^-- $<CR>{gq`^

> Got an error when I tried to use it. Would someone please decode the
> map. I tried to debug it, but obviously did not understand the map
> syntax in spite of reading man.

gg   go to first line

/    search for

^$   a line with thing but the cf/lf  (nothing between start and end)

V    switch to visual mode, line basis

/    search for 

--[space]  a legal sig delimiter (-- ) with nothing else on the line

{g   format what was just highlighted in visual mode

~^   return cursor to where it started (I *think* -- and it was me who
     added those two characters to Tim H.'s code <g>)

-- 
Blinky                              Linux RU 297263
Spam: The Boulder Pledge   http://snurl.com/boulder
All In The Family      http://snurl.com/familything
Re: SLRN: choice of editor and word wrapper
#128558
Author: Steve W
Date: Mon, 14 Jul 2003 12:28
52 lines
2838 bytes
Thanks for the explanation and a couple of minor corrections below.

On 14 Jul 2003 06:35:33 GMT, Blinky the Shark <no.spam@box.invalid>
wrote:
> Mike Vanecek wrote:
> 
>> On Mon, 14 Jul 2003 02:00:35 GMT, SINNER wrote:
>>> Andrew Preater Wrote in news.software.readers, on Sun, 13 Jul 2003
>>> 18:57:21 +0100:
> 
>>> [...]
> 
>>>>> you can SHIFT-V which will put you in visual mode and select full
>>>>> lines and then SHIFT-Q to re wrap poorly wrapped text.
> 
>>>> I go for good old gqap or gqip.  I recall some discussion in n.s.r
>>>> about reformatting everything in a message body (i.e. not signature
>>>> or headers) in vim.  This was what was suggested for your vimrc:
> 
>>>> map <f5> gg/^$<CR>V/^-- $<CR>{gq`^
> 
>> Got an error when I tried to use it. Would someone please decode the
>> map. I tried to debug it, but obviously did not understand the map
>> syntax in spite of reading man.
> 
> gg   go to first line
> 
> /    search for
> 
> ^$   a line with thing but the cf/lf  (nothing between start and end)
> 
> V    switch to visual mode, line basis
> 
> /    search for 
> 
> --[space]  a legal sig delimiter (-- ) with nothing else on the line
> 
> {g   format what was just highlighted in visual mode

{    move cursor back one paragraph (just above sig)
gq   format what was just highlighted in visual mode

> 
> ~^   return cursor to where it started (I *think* -- and it was me who
> added those two characters to Tim H.'s code <g>)
> 

`^    move cursor to where it was the last time insert mode was exited.

-- 
Steve W
s (dot) wal (at) verizon (dot) net
Re: SLRN: choice of editor and word wrapper
#128574
Author: Mike Vanecek
Date: Mon, 14 Jul 2003 17:37
65 lines
3259 bytes
On Mon, 14 Jul 2003 12:28:44 GMT, Steve W wrote:
> Thanks for the explanation and a couple of minor corrections below.
> 
> On 14 Jul 2003 06:35:33 GMT, Blinky the Shark <no.spam@box.invalid>
> wrote:
>> Mike Vanecek wrote:
>> 
>>> On Mon, 14 Jul 2003 02:00:35 GMT, SINNER wrote:
>>>> Andrew Preater Wrote in news.software.readers, on Sun, 13 Jul 2003
>>>> 18:57:21 +0100:
>> 
>>>> [...]
>> 
>>>>>> you can SHIFT-V which will put you in visual mode and select full
>>>>>> lines and then SHIFT-Q to re wrap poorly wrapped text.
>> 
>>>>> I go for good old gqap or gqip.  I recall some discussion in n.s.r
>>>>> about reformatting everything in a message body (i.e. not signature
>>>>> or headers) in vim.  This was what was suggested for your vimrc:
>> 
>>>>> map <f5> gg/^$<CR>V/^-- $<CR>{gq`^
>> 
>>> Got an error when I tried to use it. Would someone please decode the
>>> map. I tried to debug it, but obviously did not understand the map
>>> syntax in spite of reading man.
>> 
>> gg   go to first line
>> 
>> /    search for
>> 
>> ^$   a line with thing but the cf/lf  (nothing between start and end)
>> 
>> V    switch to visual mode, line basis
>> 
>> /    search for 

This search /^-- $<CR> is failing with a pattern not found error. Also,
what happens, as in this message, the pattern -- is used in the message
body for other than a signature?

I have to use lowercase v to switch to visual mode since uppercase V
starts a spell check. I guess I could map it to <f8> and then uppercase
V would be available for visual mode, line basis.

Still, I have having problems with the above search combination.

>> 
>> --[space]  a legal sig delimiter (-- ) with nothing else on the line

Can something else be used?  Why does my search fail?

>> 
>> {g   format what was just highlighted in visual mode
> 
> {    move cursor back one paragraph (just above sig)
> gq   format what was just highlighted in visual mode
> 
>> 
>> ~^   return cursor to where it started (I *think* -- and it was me who
>> added those two characters to Tim H.'s code <g>)
>> 
> 
> `^    move cursor to where it was the last time insert mode was exited.
> 
Re: SLRN: choice of editor and word wrapper
#128577
Author: Steve W
Date: Mon, 14 Jul 2003 17:49
76 lines
3786 bytes
On 14 Jul 2003 12:37:30 -0500, Mike Vanecek <MikeV99@privacy.net> wrote:
> On Mon, 14 Jul 2003 12:28:44 GMT, Steve W wrote:
>> Thanks for the explanation and a couple of minor corrections below.
>> 
>> On 14 Jul 2003 06:35:33 GMT, Blinky the Shark <no.spam@box.invalid>
>> wrote:
>>> Mike Vanecek wrote:
>>> 
>>>> On Mon, 14 Jul 2003 02:00:35 GMT, SINNER wrote:
>>>>> Andrew Preater Wrote in news.software.readers, on Sun, 13 Jul 2003
>>>>> 18:57:21 +0100:
>>> 
>>>>> [...]
>>> 
>>>>>>> you can SHIFT-V which will put you in visual mode and select full
>>>>>>> lines and then SHIFT-Q to re wrap poorly wrapped text.
>>> 
>>>>>> I go for good old gqap or gqip.  I recall some discussion in n.s.r
>>>>>> about reformatting everything in a message body (i.e. not signature
>>>>>> or headers) in vim.  This was what was suggested for your vimrc:
>>> 
>>>>>> map <f5> gg/^$<CR>V/^-- $<CR>{gq`^
>>> 
>>>> Got an error when I tried to use it. Would someone please decode the
>>>> map. I tried to debug it, but obviously did not understand the map
>>>> syntax in spite of reading man.
>>> 
>>> gg   go to first line
>>> 
>>> /    search for
>>> 
>>> ^$   a line with thing but the cf/lf  (nothing between start and end)
>>> 
>>> V    switch to visual mode, line basis
>>> 
>>> /    search for 
> 
> This search /^-- $<CR> is failing with a pattern not found error. Also,
> what happens, as in this message, the pattern -- is used in the message
> body for other than a signature?

matches if the only 3 charaters on the line are "-- "

> 
> I have to use lowercase v to switch to visual mode since uppercase V
> starts a spell check. I guess I could map it to <f8> and then uppercase
> V would be available for visual mode, line basis.
> 
> Still, I have having problems with the above search combination.
> 
>>> 
>>> --[space]  a legal sig delimiter (-- ) with nothing else on the line
> 
> Can something else be used?  Why does my search fail?

Perhaps because you have no sig to match?

> 
>>> 
>>> {g   format what was just highlighted in visual mode
>> 
>> {    move cursor back one paragraph (just above sig)
>> gq   format what was just highlighted in visual mode
>> 
>>> 
>>> ~^   return cursor to where it started (I *think* -- and it was me who
>>> added those two characters to Tim H.'s code <g>)
>>> 
>> 
>> `^    move cursor to where it was the last time insert mode was exited.
>> 


-- 
Steve W
s (dot) wal (at) verizon (dot) net
Re: SLRN: choice of editor and word wrapper
#128582
Author: Blinky the Shark
Date: Mon, 14 Jul 2003 18:34
63 lines
3474 bytes
Mike Vanecek wrote:
> On Mon, 14 Jul 2003 12:28:44 GMT, Steve W wrote:
>> Thanks for the explanation and a couple of minor corrections below.

>> On 14 Jul 2003 06:35:33 GMT, Blinky the Shark <no.spam@box.invalid>
>> wrote:
>>> Mike Vanecek wrote:

>>>> On Mon, 14 Jul 2003 02:00:35 GMT, SINNER wrote:
>>>>> Andrew Preater Wrote in news.software.readers, on Sun, 13 Jul 2003
>>>>> 18:57:21 +0100:

>>>>> [...]

>>>>>>> you can SHIFT-V which will put you in visual mode and select full
>>>>>>> lines and then SHIFT-Q to re wrap poorly wrapped text.

>>>>>> I go for good old gqap or gqip.  I recall some discussion in n.s.r
>>>>>> about reformatting everything in a message body (i.e. not signature
>>>>>> or headers) in vim.  This was what was suggested for your vimrc:

>>>>>> map <f5> gg/^$<CR>V/^-- $<CR>{gq`^

>>>> Got an error when I tried to use it. Would someone please decode the
>>>> map. I tried to debug it, but obviously did not understand the map
>>>> syntax in spite of reading man.

>>> gg   go to first line

>>> /    search for

>>> ^$   a line with thing but the cf/lf  (nothing between start and end)

>>> V    switch to visual mode, line basis

>>> /    search for 

> This search /^-- $<CR> is failing with a pattern not found error. Also,

You don't have a legal sig for it to find.

> what happens, as in this message, the pattern -- is used in the message
> body for other than a signature?

The ^ means "beginning of line".  The sig delimiter pattern (--[space])
shouldn't appear there.  If if does, it's not only taken to be a sig
delimiter by this search, it's also taken to be a sig delimiter in any
conventions-alert news reader.

> I have to use lowercase v to switch to visual mode since uppercase V
> starts a spell check. I guess I could map it to <f8> and then uppercase
> V would be available for visual mode, line basis.

The F5 mapping was only an example.

> Still, I have having problems with the above search combination.

Now you know why.

-- 
Blinky                              Linux RU 297263
Spam: The Boulder Pledge   http://snurl.com/boulder
All In The Family      http://snurl.com/familything
Re: SLRN: choice of editor and word wrapper
#128593
Author: Blinky the Shark
Date: Mon, 14 Jul 2003 20:29
71 lines
3612 bytes
Blinky the Shark wrote:
> Mike Vanecek wrote:
>> On Mon, 14 Jul 2003 12:28:44 GMT, Steve W wrote:
>>> Thanks for the explanation and a couple of minor corrections below.

>>> On 14 Jul 2003 06:35:33 GMT, Blinky the Shark <no.spam@box.invalid>
>>> wrote:
>>>> Mike Vanecek wrote:

>>>>> On Mon, 14 Jul 2003 02:00:35 GMT, SINNER wrote:
>>>>>> Andrew Preater Wrote in news.software.readers, on Sun, 13 Jul 2003
>>>>>> 18:57:21 +0100:

>>>>>> [...]

>>>>>>>> you can SHIFT-V which will put you in visual mode and select full
>>>>>>>> lines and then SHIFT-Q to re wrap poorly wrapped text.

>>>>>>> I go for good old gqap or gqip.  I recall some discussion in n.s.r
>>>>>>> about reformatting everything in a message body (i.e. not signature
>>>>>>> or headers) in vim.  This was what was suggested for your vimrc:

>>>>>>> map <f5> gg/^$<CR>V/^-- $<CR>{gq`^

>>>>> Got an error when I tried to use it. Would someone please decode the
>>>>> map. I tried to debug it, but obviously did not understand the map
>>>>> syntax in spite of reading man.

>>>> gg   go to first line

>>>> /    search for

>>>> ^$   a line with thing but the cf/lf  (nothing between start and end)

>>>> V    switch to visual mode, line basis

>>>> /    search for 

>> This search /^-- $<CR> is failing with a pattern not found error. Also,

> You don't have a legal sig for it to find.

>> what happens, as in this message, the pattern -- is used in the message
>> body for other than a signature?

> The ^ means "beginning of line".  The sig delimiter pattern (--[space])
> shouldn't appear there.  If if does, it's not only taken to be a sig

Meaning it shouldn't appear ther /unless it's intended to be a sig
delimiter/.

> delimiter by this search, it's also taken to be a sig delimiter in any
> conventions-alert news reader.

>> I have to use lowercase v to switch to visual mode since uppercase V
>> starts a spell check. I guess I could map it to <f8> and then uppercase
>> V would be available for visual mode, line basis.

> The F5 mapping was only an example.

>> Still, I have having problems with the above search combination.

> Now you know why.



-- 
Blinky                              Linux RU 297263
Spam: The Boulder Pledge   http://snurl.com/boulder
All In The Family      http://snurl.com/familything
Re: SLRN: choice of editor and word wrapper
#128614
Author: Mike Vanecek
Date: Tue, 15 Jul 2003 00:47
70 lines
3737 bytes
On Mon, 14 Jul 2003 17:49:33 GMT, Steve W wrote:
> On 14 Jul 2003 12:37:30 -0500, Mike Vanecek <MikeV99@privacy.net> wrote:
>> On Mon, 14 Jul 2003 12:28:44 GMT, Steve W wrote:
>>> Thanks for the explanation and a couple of minor corrections below.
>>> 
>>> On 14 Jul 2003 06:35:33 GMT, Blinky the Shark <no.spam@box.invalid>
>>> wrote:
>>>> Mike Vanecek wrote:
>>>> 
>>>>> On Mon, 14 Jul 2003 02:00:35 GMT, SINNER wrote:
>>>>>> Andrew Preater Wrote in news.software.readers, on Sun, 13 Jul 2003
>>>>>> 18:57:21 +0100:
>>>> 
>>>>>> [...]
>>>> 
>>>>>>>> you can SHIFT-V which will put you in visual mode and select full
>>>>>>>> lines and then SHIFT-Q to re wrap poorly wrapped text.
>>>> 
>>>>>>> I go for good old gqap or gqip.  I recall some discussion in n.s.r
>>>>>>> about reformatting everything in a message body (i.e. not signature
>>>>>>> or headers) in vim.  This was what was suggested for your vimrc:
>>>> 
>>>>>>> map <f5> gg/^$<CR>V/^-- $<CR>{gq`^
>>>> 
>>>>> Got an error when I tried to use it. Would someone please decode the
>>>>> map. I tried to debug it, but obviously did not understand the map
>>>>> syntax in spite of reading man.
>>>> 
>>>> gg   go to first line
>>>> 
>>>> /    search for
>>>> 
>>>> ^$   a line with thing but the cf/lf  (nothing between start and end)
>>>> 
>>>> V    switch to visual mode, line basis
>>>> 
>>>> /    search for 
>> 
>> This search /^-- $<CR> is failing with a pattern not found error. Also,
>> what happens, as in this message, the pattern -- is used in the message
>> body for other than a signature?
> 
> matches if the only 3 charaters on the line are "-- "
> 
>> 
>> I have to use lowercase v to switch to visual mode since uppercase V
>> starts a spell check. I guess I could map it to <f8> and then uppercase
>> V would be available for visual mode, line basis.

I changed it so that <f8> now calls the spell checker with leaves me the
ability to use shift V.


>> 
>> Still, I have having problems with the above search combination.
>> 
>>>> 
>>>> --[space]  a legal sig delimiter (-- ) with nothing else on the line
>> 
>> Can something else be used?  Why does my search fail?
> 
> Perhaps because you have no sig to match?

Boy, do I feel dumb. I normally do not append a signature to my posts
hence, as is the case at the bottom of this message, no signature
exists. I guess I need to go see how to generate a sig line so that I
can use the map to look for it.

Thanks.
Re: SLRN: choice of editor and word wrapper
#128617
Author: Mike Vanecek
Date: Tue, 15 Jul 2003 00:57
10 lines
1434 bytes
On 14 Jul 2003 18:34:39 GMT, Blinky the Shark wrote:
 
> You don't have a legal sig for it to find.

Now I do and now it works. It is the little mistakes that one makes that
makes life interesting.
 
-- 
  Mike
Re: SLRN: choice of editor and word wrapper
#128630
Author: Blinky the Shark
Date: Tue, 15 Jul 2003 03:46
19 lines
1698 bytes
Mike Vanecek wrote:

> On 14 Jul 2003 18:34:39 GMT, Blinky the Shark wrote:

>> You don't have a legal sig for it to find.

> Now I do and now it works. It is the little mistakes that one makes that

Cool beans.

> makes life interesting.

That's so true.  :)   Enjoy.

-- 
Blinky                              Linux RU 297263
Spam: The Boulder Pledge   http://snurl.com/boulder
All In The Family      http://snurl.com/familything
Re: SLRN: choice of editor and word wrapper
#128682
Author: Rudy Taraschi
Date: Tue, 15 Jul 2003 16:47
29 lines
2382 bytes
SINNER wrote:

> for any lines that are not wrapped correctly for whatever reason
> (The above should make your lines wrap at 72) you can SHIFT-V
> which will put you in visual mode and select full lines and then
> SHIFT-Q to re wrap poorly wrapped text.

I have a much quicker, one-key alternative.  If you're on a unix
box, you probably have 'fmt' installed.  Just map it to a key and
let vi(m) pipe through 'fmt'.  An example is:

    map F !}fmt
}z.

which will reformat from the current line to the end of the
paragraph, and set your cursor on the next paragraph.

This works for straight text, but falls apart for quoted text.  Run
out and look for a utility called 'par', which is like 'fmt' on
steroids.  Install it, and replace 'fmt' with 'par' in the above
map statement and you're set.

Slight mod:  change the !} with !G to re-format till end of file.

Cheers!

-- 
Rudy Taraschi - rüdÿ
                 at
               cae.com
Re: SLRN: choice of editor and word wrapper
#128688
Author: Steve W
Date: Tue, 15 Jul 2003 18:52
14 lines
1837 bytes
On 14 Jul 2003 19:47:34 -0500, Mike Vanecek <MikeV99@privacy.net> wrote:
> I guess I need to go see how to generate a sig line so that I can use
> the map to look for it.

Yes, but the other lesson that can be learned from all this is that you
can use "V" to highlight an arbitrary amount of text and then
just type "gq" to re-wrap it appropriately, quotes and all.

Very Cool.

-- 
Steve W
s (dot) wal (at) verizon (dot) net
Re: SLRN: choice of editor and word wrapper
#128725
Author: Mike Vanecek
Date: Wed, 16 Jul 2003 04:32
26 lines
1987 bytes
On Tue, 15 Jul 2003 18:52:20 GMT, Steve W wrote:
> On 14 Jul 2003 19:47:34 -0500, Mike Vanecek <MikeV99@privacy.net>
> wrote:
>> I guess I need to go see how to generate a sig line so that I can use
>> the map to look for it.
> 
> Yes, but the other lesson that can be learned from all this is that
> you can use "V" to highlight an arbitrary amount of text and then just
> type "gq" to re-wrap it appropriately, quotes and all.
> 
> Very Cool.
> 

Yes indeed. I had found that before in either man or O'Reilly, but it
did not jump out at me. The <f5> thingy is really nice. 

BTW, sometimes I get

E20: Mark Not Set

What does that mean?


-- 
  Thanks, Mike.
Re: SLRN: choice of editor and word wrapper
#128747
Author: Steve W
Date: Wed, 16 Jul 2003 13:28
30 lines
2451 bytes
On 15 Jul 2003 23:32:19 -0500, Mike Vanecek <MikeV99@privacy.net> wrote:
> On Tue, 15 Jul 2003 18:52:20 GMT, Steve W wrote:
>> On 14 Jul 2003 19:47:34 -0500, Mike Vanecek <MikeV99@privacy.net>
>> wrote:
>>> I guess I need to go see how to generate a sig line so that I can
>>> use the map to look for it.
>> 
>> Yes, but the other lesson that can be learned from all this is that
>> you can use "V" to highlight an arbitrary amount of text and then
>> just type "gq" to re-wrap it appropriately, quotes and all.
>> 
>> Very Cool.
>> 
> 
> Yes indeed. I had found that before in either man or O'Reilly, but it
> did not jump out at me. The <f5> thingy is really nice. 
> 
> BTW, sometimes I get
> 
> E20: Mark Not Set
> 
> What does that mean?

That is coming from the last bit, the `^ part.  If you have not recently
exited from insert mode there is no mark to jump to.  Seems harmless
though, just leaves cursor above sig after doing everything else.

-- 
Steve W
s (dot) wal (at) verizon (dot) net
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