News for hackers. Stuff that matters.
Re:Python has brought computer programming to a vast new aud... by mockingbirdy on Thursday July 19, 2018 @05:44PM (#17570577)
Oh, I see. I use spaces and vim (I do, but who cares). Let's start a flamewar. /s

Every time I think about tabs/spaces, I think about that episode in Silicon Valley [1]. Hilariously accurate, I have the exact same feeling when somebody uses the mouse to copy something or navigate. The cringe makes me feel alive (I guess this is the ultimate reason for those flamewars. And neurotic tendencies, of course).

[1]: https://youtu.be/SsoOG6ZeyUI

Re:Python has brought computer programming to a vast new aud... by jacobwilliamroy on Thursday July 19, 2018 @07:24PM (#17571235)

  :set ts=8 sts=0 sw=8 expandtab
I have secrets.
Re:Python has brought computer programming to a vast new aud... by nazri1 on Thursday July 19, 2018 @10:24PM (#17571975)
Go one step further and add these to you vimrc:

    command Tab1 set ts=1 sts=1 sw=1
    command Tab2 set ts=2 sts=2 sw=2
    command Tab4 set ts=4 sts=4 sw=4
    command Tab8 set ts=8 sts=8 sw=8
Re:Python has brought computer programming to a vast new aud... by SPBS on Sunday July 22, 2018 @04:51AM (#17585895)
slight addition:

    command! Tab1 set ts=1 sts=1 sw=1
    command! Tab2 set ts=2 sts=2 sw=2
    command! Tab4 set ts=4 sts=4 sw=4
    command! Tab8 set ts=8 sts=8 sw=8
The ! exclamation mark is there to prevent vim from complaining about a duplicate command already existing whenever you reload your vimrc.
Re:Python has brought computer programming to a vast new aud... by kjeetgill on Thursday July 19, 2018 @08:51PM (#17571636)
Thank you for this. I've been typing out:

:set tabstop=4

:set shiftwidth=4

:set expandtab

Like a pleb for years. What's sts?

Re:Python has brought computer programming to a vast new aud... by yorwba on Thursday July 19, 2018 @10:34PM (#17572022)
:help 'sts

Number of spaces that a <Tab> counts for while performing editing operations, like inserting a <Tab> or using <BS>. It "feels" like <Tab>s are being inserted, while in fact a mix of spaces and <Tab>s is used. This is useful to keep the 'ts' setting at its standard value of 8, while being able to edit like it is set to 'sts'. However, commands like "x" still work on the actual characters.

When 'sts' is zero, this feature is off.

You can also abbreviate expandtab to et.

Re:Python has brought computer programming to a vast new aud... by gjvc on Friday July 20, 2018 @06:19AM (#17573791)
Put them in your .vimrc, and put your dotfiles in git.

Hint: searching GitHub for "dotfiles" can be a fun and productive way to spend a Friday afternoon :-)

Re:Python has brought computer programming to a vast new aud... by kjeetgill on Friday July 20, 2018 @05:33PM (#17579136)
I mean locally yes, but I'm poking around on servers frequently enough and writing python there (Hey, I'm no saint) that it gets committed to memory eventually.
Re:Python has brought computer programming to a vast new aud... by aidos on Thursday July 19, 2018 @06:30PM (#17570908)
Haha. When we watched that episode my wife was like, “...wait, what, is that a real thing?!” Only true computer geeks could possibly understand.
Re:Python has brought computer programming to a vast new aud... by latexr on Thursday July 19, 2018 @07:33PM (#17571288)
Whenever I see that clip what I’m left wondering is if there really are people that press the space bar eight times. I have no recent memory of any editor didn’t let me press the tab key and have spaces appear instead.
Re:Python has brought computer programming to a vast new aud... by mockingbirdy on Friday July 20, 2018 @12:37AM (#17572502)
Yeah, that was annoying. If she had configured her editor to insert 4 spaces (or 8, but I think it's too many) when she presses the tab key, it would be more realistic and they could still be together (until he reads through her code). [sheds a tear].
Re:Python has brought computer programming to a vast new aud... by kjeetgill on Thursday July 19, 2018 @08:58PM (#17571665)
I'd never seen that before!

She's obviously the smarter one: Vim and (4) Spaces ftw.