[Gllug] vi indenting

Nix nix at esperi.demon.co.uk
Fri Dec 21 20:22:21 UTC 2001


On Fri, 21 Dec 2001, tet at accucard.com stated:
>>Maybe when you've had to work on code that's indented by people with
>>tabstop= set to 2, 3, 4, 8 and 10, using mixtures of spaces and tabs to
>>line up some constructs (like switch statements), you'd realise what's
>>wrong with a character which expands to an *unknown* number of spaces
>>and affects the look of the code in unknown ways.
> 
> Nope. That's a problem with people mixing spaces and tabs (either
> intentionally, or because the editor did it for them). It's not a
> problem with the concept of using tabs.

The problem is that you cannot avoid using spaces. Every program
includes spaces. The rule you want is `include spaces everywhere, except
where there are adjacent tabs', which means that if you have a big
tabbed-out block and you want to indent it by some amount not equal to
the tabsize, it is a huge pain --- which, in practice, people will not
do, so you'll always get adjacent spaces and tabs, with all the pain
that that implies.

--- and sooner or later someone will expand tabs to spaces, and then
that source file will sooner or later become fscked-up.

-- 
`Mmm... Maybe I just like strong women that can hurt me?'
     --- Vadik, on female throat-cutting doctors

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list