News for hackers. Stuff that matters.
Re:Vim.wasm by dmitryminkovsky on Thursday April 25, 2019 @08:03AM (#19747137)
Rebound my caps lock to escape and never looked back!
Re:Vim.wasm by mrzool on Thursday April 25, 2019 @09:01AM (#19747610)
You should (look back). Mapping it to Ctrl is a much more sensible choice. Can’t imagine using backspace instead of Ctrl-h, or Ctrl-A/E to go to the beginning/end of line, or Ctrl-W to delete back one word etc. Of course, Ctrl-[ is also right under your finger tips with Caps Lock mapped to Ctrl.
Re:Vim.wasm by jolmg on Thursday April 25, 2019 @12:45PM (#19749932)
> Ctrl-W to delete back one word

That's one of the most commonly used shortcuts I use. Not just in vim, but also in the shell. When I screw up on my typing, the mistake is often 3 or more letters back. Instead of hitting backspace a lot or moving the cursor and retyping mid-word, I prefer to say "screw it", hit Ctrl-w, and retype the word. It's faster. My brain is just not optimized to type pieces of words. I can't use muscle memory then.

Besides that, I don't know about you or dmitryminkovsky, but I remapped it to Caps system-wide, so by remapping to Ctrl, I'd be losing a lot more than those shortcuts you mentioned. On the other hand, CapsLock has always been a useless key to me. When I want to type in all-caps, it's less confusing/error-prone to just hold Shift with my pinky while typing. Also, Caps is in a much easier place to hit than Ctrl, so it's more fitting for a key that I hit a lot.

Re:Vim.wasm by jwandborg on Thursday April 25, 2019 @04:02PM (#19751973)
Speaking of Emacs key bindings: Alt+D, for when you've made a typo in the future.
Re:Vim.wasm by jolmg on Thursday April 25, 2019 @04:15PM (#19752096)
The equivalent of Ctrl-w in emacs is Ctrl-Backspace. It's more common to want to delete the word you just typed instead of the word to the right of the cursor.
Re:Vim.wasm by meestaahjoshee on Thursday April 25, 2019 @09:23AM (#19747775)
you can do tap for esc, hold for ctrl
Re:Vim.wasm by hultner on Thursday April 25, 2019 @09:37AM (#19747903)
This is what I've done for years now, best thing since sliced bread.
Re:Vim.wasm by dmitryminkovsky on Thursday April 25, 2019 @10:40AM (#19748629)
Tap what?
Re:Vim.wasm by stevelosh on Thursday April 25, 2019 @01:52PM (#19750725)
They mean remapping capslock to:

* Ctrl if held and used with other keys.

* Esc if pressed and released on its own.

There's no reason to press and release Ctrl on its own (minus games), and you never need to chord Esc with anything else, so they can both live on the same key.

Re:Vim.wasm by dmitryminkovsky on Thursday April 25, 2019 @02:23PM (#19751066)
Thank you for explaining. Didn't know you could do that. Will look it up.
Re:Vim.wasm by dmitryminkovsky on Thursday April 25, 2019 @10:40AM (#19748624)
> You should (look back).

Tell me about it!

> Mapping it to Ctrl is a much more sensible choice.

Never considered this, but just moved my pinkie to Ctrl and then to Esc and then to Ctrl... hmm... I use Emacs bindings in Insert Mode, wouldn't this interfere with them?

Re:Vim.wasm by mrzool on Thursday April 25, 2019 @12:01PM (#19749490)
On the contrary, mapping caps lock to ctrl makes emacs keybindings super accessible! That’s exactly my point. I even disabled the backspace to force myself to use Ctrl-H instead. It’s all in the home row!

Added bonus: on MacOS, emacs keybindings work in pretty much every place where you can input text, so you get’em everywhere. It’s part of the Cocoa Text System:

http://www.hcs.harvard.edu/~jrus/site/system-bindings.html