News for hackers. Stuff that matters.
Re:16-inch MacBook Pro by enriquto on Wednesday November 13, 2019 @04:16PM (#21529672)
you can map tab to esc inside vim so you dont need to type esc

    :imap <tab> <esc>
Re:16-inch MacBook Pro by skratchpixels on Wednesday November 13, 2019 @04:28PM (#21529789)
Tab is still important to programmers.

Developers with a new MBP manage by changing Caps Lock Key to Escape. Less pinky travel too.

If you need caps, you can download Karabiner and move caps to something else. I changed mine to pressing both Shift buttons.

Re:16-inch MacBook Pro by enriquto on Wednesday November 13, 2019 @04:34PM (#21529848)
> tab is still important for programmers

I disagree. If you are a even modestly decent programmer you know to configure autoindentation so that you never need the tab key for anything. I cannot imagine a scenario where I would need the tab key in insert mode (except a very fringe case where I need to enter a tab character in a literal string and for some reason there are no escapes like \t. But then again you can still ^V^I)

Re:16-inch MacBook Pro by apocolyps6 on Wednesday November 13, 2019 @05:24PM (#21530343)
You can't autoindent python, regardless of how good a programmer you are.
Re:16-inch MacBook Pro by enriquto on Thursday November 14, 2019 @02:14AM (#21533451)
of course you can!

you only need to press ENTER (to create a newline) and BACKSPACE (to exit the current block). You never need to press TAB

Re:16-inch MacBook Pro by Smaug123 on Wednesday November 13, 2019 @05:15PM (#21530241)
So presumably in a whitespace-sensitive language you would always leave insert mode to declare the whitespace?
Re:16-inch MacBook Pro by empthought on Wednesday November 13, 2019 @04:41PM (#21529918)
Lots of editor use the tab key to autocomplete. It's often called "tab completion."
Re:16-inch MacBook Pro by enriquto on Wednesday November 13, 2019 @04:56PM (#21530043)
of course, in vim you have ^o for that
Re:16-inch MacBook Pro by skratchpixels on Wednesday November 13, 2019 @05:47PM (#21530563)
I wasn't only speaking about Vim. Even then going to Caps is less travel than Tab.

I use Caps less than I use Tab like for switching programs.

Whatever works for you.

Re:16-inch MacBook Pro by jki275 on Thursday November 14, 2019 @02:29PM (#21538519)
Ah, no. autoindent is a nice feature that is never perfect.
Re:16-inch MacBook Pro by enriquto on Thursday November 14, 2019 @02:54PM (#21538753)
can you point to a minimal example where vanilla vim autoindent cannot cope with python code editing? I never found any situation where I had to press the tab key
Re:16-inch MacBook Pro by jki275 on Thursday November 14, 2019 @09:41PM (#21541802)
Have you ever refactored anything? Especially in Python, moving a line into a control block requires using the tab key. If you don't have to press the tab key either you're such a god programmer that you have never made a mistake or refactored anything you've ever written, or you're trolling.
Re:16-inch MacBook Pro by enriquto on Friday November 15, 2019 @12:10AM (#21542356)
there's >> and << for changing the indentation of a line.

And i'm not a good programmer, a good vim user at most