Re: indenting with tabs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


I know this isn't the subject, but how do I unsubscribe from this list.
Thanks and I apologise for jumping in on top of this subject thread.

On Feb 17, 2006, at 7:44 AM, Richard Uhtenwoldt wrote:

Karl Dahlke writes:
A downer on tabs if you go 5 or 6 levels in,
is that even a modest line gets cut into many pieces by the 80 column limit,

The Linux kernel exceeds that 80-column limit in many places,
and it is not too annoying to sighted users with 80-column
displays _if_ it does not happen with too many lines.

It's when most of the lines in a function exceed the limit
or when 10 lines in a row do that it becomes too annoying.

I'm a sighted user with an 80-column display.  (I use the
Linux in text mode on a old, small monitor.)

and that's pretty goofy.
I know, I know, properly structured code doesn't go
5 or 6 levels in, I know, but the code that I write in a hurry,
that I'm not paid to write, sometimes does that.
That's just the way it is.

Another problem with the tabs, assuming the sighted person might have the
freedom to change the spacing thereof, is that tabs are also used
in the middle of a line, to push a short comment off to the right.
This will get mucked up if the user changes tab = 4 for a lesser indent.
Well, you know, I don't think people change their tab settings
very often, so I'm not going to worry about that.
The benefits of single-char tabs on the left kinda win the day, I think.

So here is my revised file for comment.
I would like to get this right, or at least reasonably satisfactory
to a wide majority, then get on with my life.
As you see, I had no luck getting -ci0 to work.
That's the second "problem" with indent in only 20 minutes.
Guess everyone just runs indent -gnu and doesn't check these things out.
Well, with its faults, it's still the best program for the job,
kinda like democracy.

// leave blanklines alone!
// Measure levels of indenting - use 8 spaces = one tab
// The sighted user can set tab to anything he likes,
// and I don't have to listen to a mix of tabs and spaces, or many spaces,
// if I want to discern the indent level.
// I really want -ci0, but that doesn't work!
// So I'm settling for ci3, which acts like -lp when an if statement
// is involved, and those are the ones that are usually long anyways.
// Braces are set by the coding standards of the linux kernel
// Breaking long lines.
// Inserting spaces - usually I don't want it
// can't prevent the space in switch (x)
// the space in while(x--) ; is a good thing

Karl Dahlke

Blinux-develop mailing list

Blinux-develop mailing list

[Index of Archives]     [Linux for the Blind]     [Fedora]     [Kernel List]     [Red Hat Install]     [Red Hat Watch List]     [Red Hat Development]     [Gimp]     [Yosemite News]     [Big List of Linux Books]