Brian Frederick Kimball wrote:

> If it's nvi (the default vi on Debian), you want "set wraplen=NN" in
> your $HOME/.exrc.  But nvi is pretty slim on features-- it doesn't even
> have multi-level undo.  Better to just install vim & vim-rt and put "set
> textwidth=NN" in your $HOME/.vimrc.

Oh, and if you have trouble with your paragraph formatting (as I did
when I used nvi), that is,
if your
paragraphs end up looking
like this
because you tried to revised them,

install the par package, put
        export PARINIT='rTbgqR B=.?_A_a Q=_s>|' 
in your $HOME/.bashrc and execute it on the command line, and then you
can type "!(motion)par NN" in vi to reformat your text. (motion) should
be replaced with whatever key(s) represents the portion of the document
that you want to reformat-- if just to the end of the current paragraph,
try "}", if the current cursor position to the bottom of the document,
try "G", if the whole document, try "1G", etc.  Also note that this vi
command doesn't start with ":".

As always, man nvi and man par for details.

Or install vim & vim-rt and use the builtin "gq(motion)" command which
accomplishes much the same thing.

        brian

Reply via email to