[EMAIL PROTECTED] writes:
>'lo yourself.
>
>I know it's not a vim answer, but regular joe's read this list too :-)
>Depending on how you have set up your term paper, fmt might do what you
>want, not as a vi command, but as a textutil to operate on the file
from
>the command line. Well, maybe vi will run it in a shell or so, but I
>had in mind to take a break from vi,
>
>fmt -w 72 file >otherfile
>less file (see if you like it, if you do..)
>mv otherfile file
Lawson has the right idea, but there's a simpler way (no explicit
external files).
You might like to put the following line (or something similar)
in your .vimrc:
map F !}fmt -c
This passes the current line and subsequent lines in the current
paragraph (determined by '}') as stdin ('!') to the filter 'fmt -c', replacing
the contents of those lines by the filter's stdout. (For meaning of -c, man fmt. '-w
72' could be put here too.)
The 'map F' maps this command onto the 'F' key in command mode - you may
want to use a different key mapping if you already use 'F' for something.
David.
--
David Boyce
MessagingDirect (UK) Ltd.
Tel: +44 20 8332 9091 Richmond, Surrey, ENGLAND
Email: [EMAIL PROTECTED] WWW: http://www.MessagingDirect.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs