dear all,
i asked about this on comp.editors:
this macro maps the home key to format your paragraphs according to what
your textwidth is.
if you're like me, you sometimes like to have documents with textwidths
other than 80 chars, especially for source, html or latex files.
this macro uses fmt, but sets the width to whatever the current value of
textwidth is.
so even if you're in the middle of editing a document, and you resize
your window and set textwidth to the new window width, this macro will
still produce the correct results. no need to to quit your session and
re-edit to get a new mapping in place:
map <kHome> !}fmt --width='.&tw<Home>exec '<End><CR>
don't ask me to parse it. this one is beyond me. :-)
another tip: you can get modelines to work, even if you comment out the
modline. the trick is to put a space between the comment and "vim". so
for example, placing this line at the end (or beginning) of a latex file
will set the textwidth of that file:
vim:tw=86:
this does what you want it to, but unfortunately, you know have the text
"vim:tw=86:" in your document. commenting it out this way will cause the
modeline to not execute:
%vim:tw=86
however, this will leave the text commented out, but vim will still parse
it:
% vim:tw=86:
pete
--
"...and here is fortress ovum being stormed by [EMAIL PROTECTED]
millions of tiny warriors..." www.dirac.org/p
-- Robert "Schweitzer" Picardo
PGP signature