Coding standards

David Laight david at
Wed Nov 27 03:33:40 CST 2002

> >Probably vi with autoindent, tabstop=8 and shiftwidth=4 (my preferred indent).
> Of course everyone has his own taste and there's nothing wrong with 8. We
> just found that with 8 spaces there's very much indentation if you have quite
> some nested ifs/whiles/fors/whatevers. While still trying to stay under 80 
> chars per line (for a nice printing) you don't have much space left
> to put code on :)

Indeed - printing in one reason you should not set the tab size to
anything other than 8.

With vi and sw=4,ts=8,ai you indent with ^T and outdent with ^D.
vi adds the correct number of tabs and spaces to end up in the
right position.

8 char indents (as used by netbsd) to tend to leave you trying to
pretify code in about 16 colums sometimes.
Made more likely if your style involves 2 indents for a switch
statement, eg:
	switch (...) {
		case ...:


David Laight: david at

More information about the wine-devel mailing list