Bill Jonas on Sun, 15 Jul 2001 01:17:54 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Text width and reformatting (was: [PLUG] Help with WINE)


On Sat, Jul 14, 2001 at 12:46:02PM -0400, gabriel rosenkoetter wrote:
> I keep vi's wrapmargin variable (the number of columns from the

If you use vim ('though I doubt it since you're a BSD guy ;) ), you can
":set textwidth=72" or ":set tw=72", for example, and then it doesn't
matter how big your xterm windows are.  (For those that don't know,
wrapmargin (or its abbreviation, wm) counts left from the right margin,
which can screw things up if you resize your xterm.  Vim's textwidth
counts right from the left margin.)

> right side of the screen at which it will wrap) set to 12, actually.
> (Mostly because I find that matches up best with what fmt(1)'s
> formatting when given no extra arguments. I just pipe a few lines
> out to fmt if I screw up the formatting on a given line.)

Again, vim users have it a bit easier. ;-)  Vim has a built-in command
for doing the same thing as fmt, but it uses whatever value you have
textwidth set to.  Use "gq<motion>".  For example, "{gq}" is the
functional equivalent of Pico's ^J command.  The nice thing about the gq
builtin is that it reflows the text as well as re-does the quoting
characters at the beginning of the line.  ("{gq}" in English means,
"Move to the start of the current paragraph and apply the 'gq' command
to the end of the paragraph.")

Humbly submitted,
Bill
-- 
Bill Jonas    *    bill@billjonas.com    *    http://www.billjonas.com/
"As we enjoy great advantages from the inventions of others,  we should
be glad of an opportunity to serve others by any invention of ours; and
this we should do freely and generously."          -- Benjamin Franklin


______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug