On Feb 9, 2007, at 12:39 PM, Ryan Schmidt wrote:

I assume that's due to the stupid setting available in emacs or vi or whatever editor it is that actually encourages that behavior. The one where they've said "We want to indent to 4-space tabs. However, the editor is configured to print 8 spaces for a tab. Therefore, when we want to indent one level, we will use 4 spaces, and when we want to indent 2 levels, we will use one tab, and when we want to indent three levels, we will use one tab and then 4 spaces." And so forth. I'm convinced such an editor setting exists somewhere, because I have seen this nonsense in other projects too, even to the extreme of 2-space indentation. (Indent sequence: 2 spaces, 4 spaces, 6 spaces, one tab, one tab and 2 spaces, etc.)


I doubt that's the case. I see this in places where there's 2 tabs followed by 4 spaces. Why would somebody have their tabs set to width 8 and then want to indent 4 for a nesting level? That makes no sense.

No, not really a problem. I would accept extra disk space if this solution brought significant advantages, but I'm saying it brings drawbacks.


Do you view commenting code as a drawback as well? That adds far more disk space than changing tabs to spaces does. The disk space is simply a non-issue.

I use TextWrangler, the free sibbling of BBEdit.


Also, if I press the Tab key on the keyboard, it inserts a tab character. Even if I could tell the editor to insert spaces instead, I would not configure my editor this way, because that is not how I want to use my editor in every other text file that I edit.


Funny, I use soft tabs almost exclusively, and dislike it when I have to switch back to hard tabs just to fit the indentation used by a particular text file.

Now I'm curious: What editor do other people use to edit their portfiles?


Usually TextMate, but sometimes vim.

I'm just saying that you may like 2-space tabs, but I don't. If that's what we standardize on, I'll be unhappy. Someone else may like 3-space tabs, and they'll be unhappy unless we choose that. Why choose at all? Why not let the user choose with their editor's tab width setting? That's what it's for.


Sure, that's what it's for, but it doesn't work. Go look around at the current source. Sure, it's mostly tabs, but I routinely run into spaces mixed among the tabs and it causes indentation problems.

There's a reason that software projects often standardize their coding style, including spacing conventions.

-- 
Kevin Ballard
http://kevin.sb.org
eridius@macports.org
http://www.tildesoft.com