On Wednesday 27 November 2002 08:54, Fabian Cenedese wrote:
I found a couple that used ~4space indent, and used tabs too (they seemed to expect 1tab = 8, as the code looked neat in a standard text editor).
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 :)
You seem to not understand :) tabstop=8:shiftwidth=4 means that the tabs are 8 chars wide, but the indentation is 4 chars wide. That means that when you indent once 4 chars is used for indentation, if you indent twice then a tab (8 chars) is used. If you indent one more then one tab and 4 chars are used (that is 12 chars). Vim automatically manages indentation or you can indent/unindent manually. So the indentation is 4, but tab means 8. And that is much better for printing than use tabs with same strange width, because printers do not understand that. :)
Regards Zsolt