[PLUG] some awk-fu or perl to word wrap a text file?
Wil Cooley
wcooley at nakedape.cc
Wed Oct 17 14:59:51 UTC 2007
On Wed, 2007-10-17 at 07:26 -0700, Russell Senior wrote:
> Lots fewer keystrokes! ;-)
Well... in vim you can just map the fmt command and have equally few
keystrokes:
map <C-K> j{!}fmt -w80 -u<cr>}
(You can of course do it in other implementations, but not with this
exact syntax.)
Also, vim has 'gq' and 'gw' which will format text and, unlike fmt, is
smart enough to preserve comment symbols at the beginning of the line.
Wil
More information about the PLUG
mailing list