:set ts=2
:set sw=2
will set vim's indent level (shiftwidth) to 2 spaces. 2 spaces is also the tabstop, which means each indent level will be one tab character. Replace "2" with any number you feel comfortable with, indent anything past the "current indent level" with spaces, and everything will always work.
Unless someone uses a different editor, anyway. Of course, if anyone uses Notepad to write code, they need to be shot... but even emacs might act strangely. I would assume it has some way of setting the "shift width", but I don't know what it is. |