> I've been using vim to edit shell scripts. Tonight, when I go to
> continue editing my files, I find that automatic indenting is off.
> 
> a) How the hell did this happen?
Not sure, but probably related to...

> b) How do I correct it?
<ESC>:set ai

The colon tells vi(m) that you're about to give it a non-editing
command.
"set" (can be abbreviated to "se", for the impatient like me) tells it you
want to set a vim-environment variable
"ai" is short for "auto-indent"

You can, if you wish, use the full version of the variable name in your
.vimrc file, to save you scratching your head later and wondering what
that cryptic command does.
Or you could add a comment in there :)


Hope this helps.

-- 
Cheers,
James
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to