[lug] Wrapping lines of text in VIM

Chip Atkinson chip at pupman.com
Thu Sep 16 16:46:10 MDT 2004


Oh, cool!  I didn't know that.  Thanks!

Chip

On Thu, 16 Sep 2004, David Morris wrote:

> 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
>     gg
>     gqG
> 
> 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).
> 
> --David
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
> 




More information about the LUG mailing list