[oclug] Form and Function (was Evolution problem)
Rod Giffin
rod at giffinscientific.com
Tue Jun 17 18:14:03 EDT 2003
On Tue, 2003-06-17 at 16:50, Jon Earle wrote:
> On Tue, 17 Jun 2003, Scott Moynes wrote:
>
> > of how many spaces one can trade for a tab, added a few lines. Mix in a
> > few mixed indented nested case blocks without braces, and my tears and
> > hours of lost time soon reveal themselves. Sure, tabs didn't create
> > the problem, but it definately exasperated it.
>
> So, what is the accepted method of dealing with tabs for indenting code?
> Convert them to the number of spaces your tab is set to before saving?
>
> I admit, I'm guilty of using tabs to line up my code - it makes it so easy
> to line things up - but you're right, on other terminals, it looks like
> crap.
What looks most like crap is mixing tabs and spaces. I usually convert
tabs to 4 spaces, then fix the left over alignment problem manually. It
can be a chore.
There are some "beautification" programs out there that are supposed to
make things easier. Be wary of the output of these. They can
misinterpret what you intended.
The hardest part for me really was switching to using the space bar.
That took about a month to get into the habbit of, and then I switched
editors to one that inserted spaces instead of tabs with the tab key and
I started depending on it again.
The best advice I can give is to use whatever looks good on whatever
environment you're working in, but don't mix tabs and spaces.
Rod.
More information about the OCLUG
mailing list