8 ms·
Seriously, how do you exit vim insert mode without an ESC key?
by boobsbr 8y ago
Seriously, how do you exit vim insert mode without an ESC key?
- jek0 8y agoinoremap jk <esc>
- kps 8y agoEdsger Dijkstra disapproves.
- grzm 8y agohttps://vi.stackexchange.com/questions/300/other-ways-to-exit-insert-mode-besides-escape https://vi.stackexchange.com/questions/300/other-ways-to-exi...
- eej71 8y agoThe situation with emacs isn't much better!
- mschaef 8y agoWhy do you say that? I've used emacs for years and use the escape key very infrequently. (Although I do swap control and caps lock, and have for years.)
- Steltek 8y agoAt a guess, it's the layout of Ctrl and Alt on Mac keyboards. They're small and crammed right next to each other. It's physically painful to use Mac keyboards for Linux-y tasks and I don't understand people's love of them.
- madeofpalk 8y agoThe Touch Bar has a soft escape key in the same position. It takes a bit to get used to, but I found it find as a non-frequent vim/ESC-key user.
- hugg 8y agoyou can bind for example caps lock globally on mac to esc, thats what i did
- Gonzih 8y agoYou can use Ctrl+[
- mantas 8y agoI'm yet to see a serious VIM user who didn't remap ESC to caps lock yet. Regardless of keyboard configuration.
- publicfig 8y agoI can't do that because I've already mapped Caps Lock to Ctrl... Also being a heavy Tmux user, it seemed more useful at the time.
- evgen 8y agoGet Karabiner-Elements and you can map press-and-hold on caps lock to control and press-and-release on caps lock to esc. Massive win for emacs users and most vim users I have introduced it to seem to like it.
- publicfig 8y agoOoo, interesting! I'll definitely look into that when I go into one of my next "optimize my workflow as a form of procrastination" mindsets I tend to end up in
- xoa 8y agoControllerMate is another really powerful tool, though not just for keyboards but for USB devices in general. Interface is a bit funky but it's really worth checking out, not just mapping but conditional reactions, timing, scripting, for any key or arbitrary combinations of keys or non-keyboard devices (I made a DS4 work with a Mac at launch except for the touchpad part of it for example).
- TomVDB 8y agoYou must found one. I used caps lock all the time for its intended function (shocking!), so remapping it is just not an option.
- publicfig 8y agoWhile I haven't remapped it for Esc (I have for Ctrl), you can reassign both keys. It took about a week to get used to it, but now my Control key acts as caps lock and honestly it works like it was designed to work that way. No more accidental hitting of caps lock with my pinky, and no weird gestures to hit a key I use all the time. Not saying your method is by any means worse or wrong, just thought it'd be worth pointing out!
- pilif 8y agoEither by pressing the virtual "Esc" key displayed on the TouchBar (that's what I do), or by using Ctrl-[, or by remapping any other key to ESC
- philsnow 8y agoCtrl-C also exits insert mode (and replace mode) and some people find that easier to type than Ctrl-[ (especially if you have a keyboard where '[' is not handy)
- cnlwsu 8y agoThe escape key is there in terminal in same position it would be if there was no touchbar. Its been a complete non issue that people who do not have the touchbar like to complain about.