9 ms·
The escape key will be especially welcome by me, as I found the touchbar exceptionally hard to deal with, and I would often have to hit it three or four times t
by dashwav 7y ago
The escape key will be especially welcome by me, as I found the touchbar exceptionally hard to deal with, and I would often have to hit it three or four times to get vim to exit insert mode. I actually didn't have much trouble with the arrow keys, despite all the negative feedback I saw for them online.
Hopefully this trend continues and they can iterate on this model even further.
- crusso 7y agoI remapped caps lock to escape and it's been wonderful. The oversized caps lock key on keyboards is an inexplicably bad UI choice anyway.
- Tsiklon 7y agoPersonally I find a classic Unix layout to work best for me. I’ve mapped the caps lock key to CTRL. I use that far more than I ever use caps, it feels quite natural to me after about a week or two of adjustment.
- PascLeRasc 7y agoYou can use Karabiner Elements to configure your Caps Lock to act as Ctrl when held down, and escape when tapped alone. Best of both worlds.
- matttb 7y agoIn addition to this you can do something like mapping Shift+Caps Lock to be an actual Caps Lock toggle. Now you get 3 buttons for one and it works amazingly well.
- darkteflon 7y agoThis was a revelation when I discovered it earlier this year. I could never go back now, it’s so convenient.
- DogLover_ 7y agoThis argument as THE SOLUTION really needs to stop. As an example I mapped caps to ctrl a long time ago so this won't work without compromises.
- foldr 7y agoYou can use Karbiner to have a short press of caps lock map to escape and a long press to control. Works pretty good.
- fwip 7y agoYep - I have mine set to be control if pressed with other keys, and escape if pressed alone. Works for everything except if I'm playing a videogame that uses ctrl to crouch. Other people argue that all real vimmers use ctrl-[ instead of escape. Edit: This is on a 2015 macbook pro, that still has the physical function keys. I almost never use the physical escape key, just capslock instead.
- 2muchcoffeeman 7y agoI almost never use caps lock so I just mapped caps to esc and hold shift for all caps. The no escape thing doesn’t bother me anymore.
- qmmmur 7y agoIs there a guide on this?
- 7y ago
- ghaff 7y ago>The oversized caps lock key on keyboards is an inexplicably bad UI choice anyway. It's probably largely a relic from typewriters when it was originally something of a mechanical necessity and then made more sense than today in the context of filling out forms etc.
- macintux 7y agoSun and Apple both used to have control in that spot. It was a sad day when they surrendered to the inferior PC keyboard layout.
- ghaff 7y agoI used to have really strong opinions about keyboards. I even still have a Northgate keyboard which was an "improved" version of the original IBM keyboard. (Which largely mirrored the Selectric.) But TBH, I use so many different systems these days that I pretty much just accept that keyboard layouts and keyboard feel are going to differ from machine to machine and there's no point fussing about it.
- ghshephard 7y agoI haven't used a laptop, desktop, or other computer (windows/mac/Linux) in the last 15 years in which I didn't immediately configure Caps-Lock to be control within 5-minutes of setting up the system. So, to some degree - it's always been control for me.
- dublin 7y agoFWIW, early PC keyboard layouts had the Control key next to the "A", where God intended it to be, too. (Don't have the link handy, but there was a story posted here on HN in the past week or so about the history of the PC keyboard that showed this...)
- wyclif 7y agoTrue, and as a longtime fan of the IBM Model 'M' that had that configuration and was mechanical and built to last with buckling springs, I'm glad I can get one of these: https://www.pckeyboard.com/page/product/40PSA https://www.pckeyboard.com/page/product/40PSA
- ImprovedSilence 7y agoI remapped jk to escape. It’s easily my favorite remap, I don’t even bother with escape on full keyboards/desktops.
- Lio 7y agoThat's a bit of a pain if you put that into muscle memory and use other Vi interface software that can't be remapped. Personally I'm in the Caps to Ctrl and use Ctrl-[ for escape camp. Works in my shell, REPLs and in my database clients and anywhere else with a readline interface that isn't Vim. Even with that I still want a physical escape key.
- goerz 7y agohow do you type "e_{ijk}"?
- L3viathan 7y agoFor example by typing: e_{ij<c-v>k}
- ImprovedSilence 7y agojk is a pretty rare combo to begin with, but when you do need it, just hitting j, and pausing for a second takes that input singularly, then you can type k safely. Slightly sub optimal, yes. But the benefits outweigh the negatives for me.
- deleted 7y ago[deleted]
- stevehawk 7y agoobligatory xkcd - https://xkcd.com/1172/ https://xkcd.com/1172/
- vcavallo 7y agothere are great alternatives to reaching up for ‘esc’ in vim. ctrl-[ is my favorite. the ol double-pinkie
- cymantic 7y agokj
- ascagnel_ 7y agoI remapped `jj` to escape (shortly before the touchbar was announced), because I disliked either having to move my hand or use both hands to get out of insert mode. map! jj <Esc>
- vcavallo 7y agoctrl-[ works out of the box
- seanhunter 7y agoYeah similarly I use inoremap jk <Esc>
- ashton314 7y agoPersonally an Emacs user---I use the esc key loads too. Best thing I ever did was install Karabiner to remap capslock to esc when tapped, and to ctrl when held down. (One meta key to rule them all!) Have you tried anything like that? Just curious.
- ilogik 7y agoI was listening to the Upgrade podcast (from relayfm), the episode that was just released includes an interview with someone from Apple (I think she's the PM for the MBP?) She specifically mentioned vim users as one of the reasons for bringing back the escape key
- sdan 7y agoHow long ago was "just released"? Pretty sure Apple employees are locked into heavy NDAs (like many others in tech).
- forgingahead 7y agoThis is the link to the podcast if anyone is interested: https://www.relay.fm/upgrade/271 https://www.relay.fm/upgrade/271
- NetOpWibby 7y agoThank you
- seirl 7y agoDo you have a timestamp for the vim thing?
- cjsaltlake 7y ago~19:50
- j45 7y agoThe tough thing about the touch bar is how often it freezes. It's hard to get used to it when all that is noticeable is the few times a week it does it.
- rahoulb 7y agoI started using Ctrl-C instead of Escape in Vim years ago (long before the Touchbar) as it means I don't have to move my hands from the home position.
- super_mario 7y agoCTRL-[ is standard Vim mapping for Esc.
- secabeen 7y agoIt's deeper than that. Control-[ is the same keycode as escape. [ is the next character after Z in ASCII, and Control-[ is the next character after Control-Z. It's not a mapping, they are one and the same.
- graywh 7y agoctrl-c is a poor substitute for several reasons 1. it cancels any modifiers on the insert command 2. it won't trigger any abbreviations 3. it doesn't work with visual-block insert 4. it bypasses InsertLeave autocommands
- na85 7y ago>ctrl-c is a poor substitute for several reasons Counterpoint: modal editing is a poor substitute for several reasons ;)
- enriquto 7y agoyou can map tab to esc inside vim so you dont need to type esc :imap <tab> <esc>
- skratchpixels 7y agoTab 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.
- enriquto 7y ago> 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)
- empthought 7y agoLots of editor use the tab key to autocomplete. It's often called "tab completion."
- enriquto 7y agoof course, in vim you have ^o for that
- Smaug123 7y agoSo presumably in a whitespace-sensitive language you would always leave insert mode to declare the whitespace?
- apocolyps6 7y agoYou can't autoindent python, regardless of how good a programmer you are.
- prewett 7y agoUse Ctrl-[ for ESC. Not only is [ always in the same spot, but you don't have to move your fingers off the normal keys or stretch. I was fortunate that a friend told me about that early on, otherwise I couldn't have handled VI, the stretching is so inconvenient (especially so on those old IBM PS/2 keyboards with cubic keys).
- cesarb 7y ago> Not only is [ always in the same spot Only if it's the same keyboard layout. For instance, on the US layout, [ is immediately to the right of P, while on the ABNT-2 layout, it's two keys to the right of P. Meanwhile, ESC is on the same place (top left of the keyboard) in both.
- skohan 7y agoI have always used ctr-c. I didn't even really know escape was an option, so I never had to adapt.