Remix.run Logo
cassepipe 9 hours ago

> The hardcore, moved to vim or emacs, trading immediate feedback and higher usability for the steepest learning curve I’ve seen

The only hard part about vim is to be forced to strecth the finger up to Escape for what is essentially the most essential function in a modal editor: Going back to command mode. The ideal workflow is do a quick edit and go back to command ("normal") mode instantly. The fact that Escape is used is a historical artifact that needs to be called out.

So just remap CapsLock to escape, it system-wide, it's not that hard and it's nice to have Escape there generally. In Linux and MacOS it's just a GUI setting away and in windows you just have to edit (create?) a registry key. Can be done on any machine under a minute.

Apart from that I don't see where the learning curve is since you can just start with the basics from vim-tutor and look up for more when you feel you're spending too much time on something. I already felt faster than in any other editor when I just knew the basics. The real problem of vim is that you get used to modal editing very quickly and it feels like the stone age when you don't have it.

mr_mitm 9 hours ago | parent | next [-]

Unfortunately, remapping escape to caps lock can lead to serious friction if you have to work with different laptops a lot, like I do. The muscle memory gets in the way a lot.

lucasoshiro 8 hours ago | parent | next [-]

I always remap Caps Lock to Ctrl. I understand that Caps Lock needed to be next to Shift in typewriters, but in computers it seems like it is wasting a key in the home row for only be used sometimes for screaming (which can be done by holding shift...)

IBCNU 2 hours ago | parent [-]

fellow Caps Lock to Ctrl remapper (and neovim) here...

cassepipe 7 hours ago | parent | prev | next [-]

Which is why I never went with CapsLock being both Ctrl and Escape depending of whether it's part of a key combo because it's whole setup. On the contrary, whenever I use someone else's machine I can quickly go in the settings, set the option and then set it off after I am done.

thayne 8 hours ago | parent | prev | next [-]

If only keyboard makers would just always put escape there.

wtetzner 8 hours ago | parent [-]

It should always be "hold for control" and "tap for esc".

bonsai_spool 6 hours ago | parent | prev | next [-]

Ctrl-[ is accepted across Vim installs

jolmg 6 hours ago | parent | prev [-]

Ctrl-C also works.

pilgrim0 8 hours ago | parent | prev | next [-]

remapping capslock to esc is something nobody whom i've shamed into doing can go back from. it's just night and day. i've been thinking lately that the reason we need hjkl is vim is because the keyboard layout is actually bad for arrows. on typewriters there was no arrows, but on a computer arrows are of primary importance. i think the spacebar doesn't need to be so big, there's no reason for it to be available to both thumbs, and i think moving the small set of arrows into the left or right part of the spacebar position would be so much better for typing because the hjkl hack only work in hacker editors, but we need to use arrows a lot on normal software and it's super bad for your hand if you use it a lot. i started developing inflamations because of the way i fold my thumb to reach for the arrows without moving my entire hand.

MarsIronPI 8 hours ago | parent [-]

> i think the spacebar doesn't need to be so big, there's no reason for it to be available to both thumbs

This is why I love JIS, even though I don't actually need the Japanese keys. That small spacebar is so much better, and you get three extra keys (Henkan, Muhenkan and Kana) along the bottom row. As an Emacs user, I bind Henkan and Muhenkan to be Control keys. It's very comfortable.

wpm 6 hours ago | parent [-]

I was just thinking this today tweaking the layout on my lilypad58, a layout I don't love and kept arriving at, "I just want more modifiers". Using JIS is genius.

MarsIronPI 4 hours ago | parent [-]

My JIS bottom row is currently:

<Meta> <Super> <Alt> <Control> <Space> <Control> <Alt> <Super> <Compose/Meta> <Greek>

I have left Control mapped to Meta, {,Mu}Henkan mapped to Control, Kana to right Alt, right Alt to Super, Menu to Compose/Meta (tap/hold) and right Control mapped to Greek.

I use keymapper[0] to do low-level remapping and tap/hold, and a custom XKB layout for the Greek modifier. I highly recommend this setup.

[0]: https://github.com/houmain/keymapper

tommy_axle 7 hours ago | parent | prev | next [-]

Map to "jj" and call it a day since your finger is already on the home row

Also ctrl + [ is standard terminal/ascii for esc so that might be a bit more ergonomic than reaching for esc

cassepipe 7 hours ago | parent | next [-]

Yes but then you get used to jj (or jk) which might not be available on other vi modes (shells vi modes, gdb, glide browser ?) and it's overall quite nice to quickly escape any situation by having the key be closer.

Ctrl + [ would be acceptable if it wasn't, imo, the most important function of the editor.

EDIT: My bad, you can do it with Glide apparently

tern 7 hours ago | parent [-]

I've yet to come across something with vim bindings that lacks a .vimrc where you can map 'jk'. Either way, switching back to ESC is as annoying as it is in the first place.

mmahemoff a minute ago | parent | next [-]

Claude's vim bindings don't support ESC mapping, unfortunately for muscle memory. https://github.com/anthropics/claude-code/issues/25306

cassepipe 7 hours ago | parent | prev [-]

Well I have given at least one example. Do you not use bash/zsh/fish/nushell vi modes ?

jeremyjh 7 hours ago | parent [-]

Do you not use web search to verify assumptions ?

cassepipe 5 hours ago | parent [-]

I should have. I don't why I assumed the line editors couldn't handle two keys in a row.

tern 7 hours ago | parent | prev [-]

"jk" is even faster (you get to "roll" your fingers)

qu4z-2 an hour ago | parent [-]

And keeps you on the same line unless it was the last one, if you were already in normal mode.

saratogacx 7 hours ago | parent | prev | next [-]

Weirdly enough I actually like that Esc is so far away and it is not for efficiency but for ergonomics. It forces me to lift my hand up and reposition it away from the home row and back so I'm forced to move muscles that would otherwise just wait around and collect RSI points. I tend to use the arrow keys often as well for the same reason on the other hand (although I do still use hjkl quite a bit still)

tuvix 7 hours ago | parent | prev | next [-]

Not sure if this is bad form but i’ve always loved using jk for escape. It feels so natural to roll your index and middle fingers to get back to normal mode.

I agree, too, besides reminding myself to use numbers before movement commands there was really nothing that felt super hard about vim. It almost disappointed me, I always heard the jokes about not being able to quit it!

cassepipe 7 hours ago | parent [-]

Yes but jk does not work in other contexts (shell vi modes at least for me) and it's actually to have Escape closer to home to quickly get out of a situation

To be fair I mostly use `/` + (n/N) + Enter with `incsearch` on (by default in nvim), I feel it's really the superior way to move around and it has deprecated a lot of my vim-fu.

In the same way, apart from occasinal `ciw` (or other text-objects), I do most of my edits with `:s/old/new`. I don't even use a complicated regex as sometimes it's just easier to write one or two simpler ones. It's just faster to not have to go to a specific location before you make an edit.

jeremyjh 7 hours ago | parent [-]

It works in bash and zsh at least.

cassepipe 5 hours ago | parent [-]

I stand corrected

lucasoshiro 8 hours ago | parent | prev | next [-]

> The only hard part about vim is to be forced to strecth the finger up to Escape

I still don't understand why people keep mentioning this, ctrl-c works as well to go back to the normal mode.

> windows you just have to edit (create?) a registry key

Or use Powertoys, which I don't know why it isn't a setting.

(saying as a Mac, Linux and Emacs user, although I still use Vim in the terminal)

qu4z-2 an hour ago | parent | next [-]

C-c isn't quite the same, alas, but C-[ is. (compare 5itest<esc> vs 5itest<C-c>)

cassepipe 7 hours ago | parent | prev [-]

Because Ctrl+C for the most important function of you editor kinda sucks ? I mean you can get used to it, but you can get used to anything. Maybe we can have nice things ?

Also just to be pedantic: https://stackoverflow.com/a/5036294/10469162

redlewel 7 hours ago | parent | prev [-]

You know that CTRL + [ functions same as ESC right? Sr. dev at my job told me about this a year ago and it made vim SIGNIFICANTLY more comfortable to use day to day.

maccard 7 hours ago | parent [-]

I’ve been using vim bindings for a decade and never knew this…

skydhash 5 hours ago | parent [-]

It's about the ascii code and terminal code. (Almost?) Every non-printing character can be entered with Ctrl+<some keyboard key>. With Control pressed, D is eot (end of transmission), G is bell, H is backspace, I is line feed (next line), L is form feed (new page), M is carriage return (start of line), Z is substitute, and [ is escape.