[TUHS] tabs vs spaces - entab, detab

Lawrence Stewart stewart at serissa.com
Sat Mar 6 05:39:21 AEST 2021


I saw the light when my team presented me with a “Larry Stewart, Code Meddler” plaque.
I stopped editing other coders’ style on the spot.

I might have missed the discussion, but when did indent(1) come along?  The interwebs say it was 
in 4.1BSD.

I went through a period thinking that indent with the project standard rules on checkin was a 
reasonable idea, but git at least doesn’t seem very friendly towards that sort of thing.

Left to myself I use no tabs (except in Makefiles) and 2-space per level.  I think the most 
important thing is to maximize the code visible per screenful.  Lower indents permit longer 
identifiers before the dreaded line-wrapping.

> On 2021, Mar 5, at 12:19 PM, Richard Salz <rich.salz at gmail.com> wrote:
> 
> 
> In my own case, I had been taught the golden rule of "use the style that is already in use" - which I admit, was a hard lesson when I was young I admit.
> 
> In my first Unix job (roughly 40 years ago), I read the vi reference manual and memorized the keystroke commands.  And then did 
>    % cd /user/include
>    % vi *.h
> to fix up all the indents and comments.
> 
> Later on I graduated to learning not to do control-p on a Vax console a second time.
> 
> What were your mistakes?  ("Always mount a scratch monkey")
> 
> 
> In

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20210305/40fec4ab/attachment.htm>


More information about the TUHS mailing list