[NTLUG:Discuss] email client and VIM
Rusty Haddock
rusty at fe2o3.lonestar.org
Sun Feb 27 09:26:24 CST 2000
Gareth Jenkins wrote:
>that *is* one of the most handy features of pico, especially for emails
>that come in all sorts of unformatted states.
>
>how can you justify or format paragraphs is vi? i would love to ease of
>quick format/justification of mangled or strung out paragraphs.
To format a paragraph I have used the following :map's for quite a few years.
:map Q {!}ff -j -w 74<CR>
:map q {!}ff -w 74<CR>
This will filter a paragraph (that the cursor is presently within) through
an external program called 'ff' (fast format). The reason for having both
is that the capital Q tidies up the right margin (-j ==> justify) and the
lowercase Q doesn't. Normally I use the latter.
NOTE that the literal <CR> at the end of each map'ing is needed to
terminate the ! escape. In 'vi' you can use ^V^M to add the <CR> to the
end.
I believe that the program 'fmt' comes with most installs of Linux and can
replace the 'ff' program for the most part. Keep in mind that different
options will be needed to achieve the same effects.
Also, my mappings may override your favorite 'vi' command but they're
nothing cast in concrete; you can use pretty near whatever key you wish.
They just happen to be convenient to me.
-Rusty-
--
_____ Rusty Haddock = KD4WLZ = rusty at fe2o3.lonestar.org
|\/ o \ o
| ( -< O o Thanks, Sparky! Charles M Schulz (1922-2000)
|/\__V__/
More information about the Discuss
mailing list