Who are the "spacists"?

alister alister.ware at ntlworld.com
Mon Mar 20 14:57:51 EDT 2017


On Sun, 19 Mar 2017 23:01:22 +0000, Erik wrote:

> On 19/03/17 22:29, Jon Ribbens wrote:
>> On 2017-03-19, breamoreboy at gmail.com <breamoreboy at gmail.com> wrote:
>>> On Sunday, March 19, 2017 at 9:54:52 PM UTC, Larry Hudson wrote:
>>>> A trivial point (and irrelevant)...  The thing I find annoying about
>>>> an editor set to expand tabs to spaces is that it takes one keypress
>>>> to indent but four (or whatever) to unindent.
>>>
>>> No, just about every editor that I've ever used has SHIFT-TAB set to
>>> undo whatever TAB does.
>>
>> Not to mention plenty of editors (e.g. vim) will unindent when you
>> press backspace.
> 
> I don't think that's strictly true. If you have just indented with a tab
> character, then backspace will delete that tab character. But, if you
> indent with either 4 spaces or use the Tab key with "expandtab" enabled,
> then it will just delete the right-most space character.
> 
> The closest I've come to an "unindent" in vim so far is Ctrl-D, which
> backs up one "shift width's" worth.
> 
> 
> For sanity, in 'vim', I always use (for my own Python code, at least):
> 
> :set sw=4 ts=4 expandtabs
> 
> That way, all tab keypresses insert 4 spaces instead of a tab and the
> shift operations ('<' and '>') will do the same. This also means the
> "back up one shift-width" command (Ctrl-D) is the same as a "dedent".
> 
> 
> If you also use the autoindent setting (:set ai), then writing code is
> as easy as pressing enter and Tab to start a new suite, enter only to
> continue a suite, and enter and Ctrl-D to drop back to the outer suite.
> 
> E.

I have just tested this with geany & it works a charm,

personally I prefer tabs for setting my indent levels, it feels more 
logical & breaks nothing if the font or tab size is changed but votes 
have been counted & the jury has returned a verdict

Spaces are the preferred option, but you are still able to make your own 
choice.




-- 
It's a very *__UN*lucky week in which to be took dead.
		-- Churchy La Femme


More information about the Python-list mailing list