in reply to Tabs vs Spaces lets give this a go
Tab characters should never be used in source code. They are far too prone to being abused. Traditionally a tab character was 8 spaces wide. Almost no one uses 8 character indents so a common convention is to set the expansion width of tab characters in editors to the indent width currently being used. After a little editing some of the indent tabs will turn into spaces. After that all hell breaks loose when you share the code with a friend or workmate.
At least space indented code is presented in similar fashion by virtually all rendering systems. That is not true at all for tab indented code.
If you have a real need to alter the indentation of space indented code use a pretty printer appropriate to the language it is written in. If there isn't one available you could pretty quickly write a Perl script to figure out the indent quanta and change it to your preferred size.
Remember the golden rule - never use tabs for indentation.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Tabs vs Spaces lets give this a go
by fergal (Chaplain) on Oct 08, 2006 at 22:24 UTC | |
by GrandFather (Saint) on Oct 08, 2006 at 22:30 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |