Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] Advice on coding in VI ?


On Fri, Nov 30, 2001 at 07:09:25AM +1100, Grant Parnell wrote:
> Alright I'll bite, my biggest reason for using pico (I switch between
> vi and pico a lot) is the auto wordwrap and the paragraph formatter.
> Is there an easy way to do this in vi? Currently I really like those
> features when reading/writing email and doing documentation but the
> majority of other tasks are done with vi, in fact I'll switch editors
> mid-stream depending on the feature I want at the time.

To enable auto word wrap you need to do a 
:set tw=72
ie set the textwidth to 72 characters. or put it on your .vimrc without
the :

auto formating you can do in command mode with gqap there's probably a
shorter way of doing it or you can probably alias it to something
shorter but I've never looked into it.


-- 
John Ferlito
Senior Engineer 
Bulletproof Networks
ph:  +61 (0) 2 9663 9000
fax: +61 (0) 2 9662 4744
mob: +61 (0) 410 519 382
http://www.bulletproof.net.au/

This e-mail and any attachments are confidential and may be legally
privileged. Only the intended recipient may access or use it and no
confidentiality or privilege is waived or lost by mistaken transmission.
If you are not the intended recipient you must not copy or disclose
this email's contents to any person and you must delete it and notify
us immediately. Bulletproof Networks uses virus scanning software
but excludes all liability for viruses or similar in any attachment as
well as for any error or incompleteness in the contents of this e-mail.