[OT] Auto code reformating / one coding style enforcment.
Sean Kelly
sean at f4.ca
Mon Aug 14 18:27:19 PDT 2006
Walter Bright wrote:
> Regan Heath wrote:
>>
>> I suspect if you print this code, and the editor sends actual hard
>> tabs to the printer they'll probably be 8 spaces wide.. but:
>> 1. who prints code?!?
>
> I do. I also put code in html <pre>...</pre>, where tabs are 8. I put
> code in emails, where tabs are 8. I print code on the console, where
> tabs are 8. I send code to other operating systems, where tabs are 8.
Only by default. The first thing I do when configuring an editor is
change the tab width to 4. 8 chars is simply too wide IMO, even for
paragraph indentation.
>> 2. the editor _should_ instead send your specified # of spaces instead
>> of hard tabs.
>>
>> Problem #2 solved.
>
> Send it to where? The disk file? Then there aren't tabs in it anymore.
Right. But is that a problem? I'll admit it's a tiny time-saver to be
able to move through tab-filled regions with the cursor, but it's just
as easy (and even faster) to jump between words with control keys.
But all this is really a matter of opinion... which I guess is the
point? I've always favored using spaces because it preserves
readability regardless of one's opinion of what the correct tab width is.
Sean
More information about the Digitalmars-d
mailing list