[Gllug] tin, vi and wide messages

tet at accucard.com tet at accucard.com
Mon Nov 5 16:50:00 UTC 2001


>Having never really bothered to learn vi before I am having problems using
>it with tin as the editor.  I don't know how to make it force my lines to
>be <78 chars wide.  I used to use emacs and I did it ok in that but I
>haven't got emacs on this machine.  Can anyone tell me the configuration
>change to vi (or is it a change to the way tin calls vi) that is required?

There's no way to do this reliably in vi directly. You can use the
wrapmargin option (:set wm=2) to wrap words once they get closer than
two characters from the right of the screen. However, this only works
if you're using an 80 column window. It also only works for text
that's being inserted at the time. If you insert some text in the
middle of a line, it won't wrap any text at the end of the line that's
been pushed past the 78 column limit. I know vim has some extra line
wrapping options, but when I last tried using them, they didn't work
as well as they could.
The only real solution is to call and extenal program like fmt (or
preferably par) to wrap the lines for you. Once you've finished doing
what you want to do, you can type:

	1G!Gpar 78

or if your system doesn't have par:

	1G!Gfmt -78

Tet

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list