Indentation style
Tomi Ollila
tomi.ollila at iki.fi
Wed Jul 31 03:58:02 PDT 2019
On Tue, Jul 30 2019, Ralph Seichter wrote:
> * Tomi Ollila:
>
>> I like mixed tabs and spaces. for example cursor moves faster...
>
> If that's the case, you're just not using the right keys to move around
> the source code. :-) In Vim, keys like W/B, +/- etc. ignore whitespaces
> anyway, and Emacs has equivalents.
Perhaps... I just use arrow keys (no longer need to press c-p, c-n, c-b,
c-f so often ;D) and I can intuitively estimate how to use the keys to get
to a certain row-col position in emacs buffer -- and w/ tabs that usually
requires less keypresses... I've sometimes pressed M-b and M-f to move
over words but...
That's what leads to my opinion, which may or may not be general truth >;)
> Rumour has it there are other editors
> out in the wild, but then, some people believe anything... ;-)
>
> I am aware this is a sensitive subject, but looking at the last 35+
> years, I personally found that the only reliable way to avoid whitespace
> related hassle is to stick to spaces only.
I have only 30 years of experience in this (in 80's I did not have access
such machines where this would have been issue), so I have not had much
hassle with this (only when someone decides that tabs have only 4 character
width)
> I am not in a position to decide this, of course,
usually status quo prevails unless there is enough desire to change things
(preferably with good patches, when applicable)...
> but I am glad that Python [1] even comes with a
> command line option which turns mixed indentation into errors, making it
> easy to spot these situations.
What I've noticed python3 always fails if there is mixed tabs and spaces
used for indentation (used mg(1) in embedded device to patch python file);
I don't know whether indentation w/ tabs only would have worked there...
>
> -Ralph
>
> [1] https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces
Hmm, pep8(1) has originally been checking just tabs and spaces?
No wonder it is being renamed to pycodestyle :D
Tomi
More information about the notmuch
mailing list