[lug] Wrapping lines of text in VIM

David Morris lists at morris-clan.net
Thu Sep 16 16:41:24 MDT 2004

On Thu, Sep 16, 2004 at 04:35:31PM -0600, Chip Atkinson wrote:
> You can use fmt from within vim to format all or some of your text.  For
> example, :1,$!fmt will run all the lines in the file through fmt.  You can
> use the -w option to make it 65 wide too:
> :1,$!fmt -w 65

You can do the exact same thing with the following:

    :set textwidth=65

The 'gq' command will auto-format the text in over the range
specified (in this case, from the current position to the
end of the file).


More information about the LUG mailing list