5 ms·
A vim user who doesn't use caps lock To be real though I don't like the touch bar either.
by samdixon 8y ago
A vim user who doesn't use caps lock
To be real though I don't like the touch bar either.
- maxaf 8y agoI'm a Vim user whose caps lock key is mapped to ctrl.
- djtriptych 8y agoI map caps lock to control OS-wide. And I'm trying to train myself to use jj instead of ESC. But still. I miss my ESC / hardware volume / hardware brightness buttons etc.
- apazzolini 8y agoGive Karabiner a shot - it can map caps lock to ESC on press and CTRL on hold.
- dguo 8y agoI do this on every machine I use. I wrote a blog post with detailed instructions: https://www.dannyguo.com/blog/remap-caps-lock-to-escape-and-control/ https://www.dannyguo.com/blog/remap-caps-lock-to-escape-and-...
- tasuki 8y agoI never understood why people would want to press the same key twice to get to normal mode. Here's what I use: " j + k = normal mode inoremap jk <esc> inoremap kj <esc> And yes, it does happen that I want to enter jk or kj and it exits the insert mode. Usually when pasting something and not more often than about once a month. `:set paste!` to the rescue.
- degrews 8y agoI also recommend jk or kj over jj. Much faster and less strenuous. And it has the added benefit that, if you type it when already in normal mode, it's effectively a no-op (as opposed to jj, which will move the cursor two lines down).
- AlexandrB 8y agoTry Ctrl+[ With caps lock remapped to Ctrl its easy to reach from the home keys and requires no Vim configuration.
- aquamo 8y agoOn my 2016 MBP, I also map CapsLock -> Control and Left_Control to ESC. It's goofy having ESC down there but I need a physical key as I do not look at the keyboard while typing in vim - there is no haptic feedback from the glass surface. I am 50/50 VIM / EMacs so the it's important for my control key to be on the home row. I'm not sure why keyboards even have caps lock. It's rude in chat right :-) I started with Sun keyboards where control was on the home row. I guess if one spends hours typing long capitalized acronyms daily, then it makes sense. It's personal preference in the end. I certainly wont buy another MBP - my 2016 has had 4 trips to the Apple store since I bought it for key replacements.
- AdieuToLogic 8y agoAs I mentioned in another comment, you can use Control-[ to produce ESC in programs which respect ASCII control character values. So this will work with vim and emacs, but likely would not work to simulate depressing a cancel button in a GUI. Personally, I prefer the Control-[ combo as it allows me to slide my left pinky slightly from the home row and right pinky 45 degrees up and right to produces an ESC. Over the years it has made having to hunt for a physical ESC key quite irritating for the few programs which require it :-). HTH
- qubitcoder 8y agoI also map caps lock to control OS-wide on both macOS (Preferences > Keyboard > Modifier Keys) and on Linux (using gnome-tweak-tool). Instead of using jj or escape in Vim/Spacemacs, I just use control+[. With caps lock mapped as control, it's a single fast motion--left pinky to caps lock, and right pinky to [. I've been using this setup for years. It's one of the first things I setup on a new computer/OS. Mapping caps lock to control also has other benefits. You can quickly zip around the terminal using control+a/e/k/y/d/r etc. As an added bonus, the same keyboard shortcuts work equally well on both macOS and Linux [1]. [1] https://www.ostechnix.com/list-useful-bash-keyboard-shortcuts/ https://www.ostechnix.com/list-useful-bash-keyboard-shortcut...