Hacker News new | past | comments | ask | show | jobs | submit login

> and ‘Esc’ to move around again.

For me personally this is the reason I stopped using Vi(m) except for occasional config file editing on unfamiliar servers, and started looking elsewhere (Emacs) for my goto text editor. I'm not looking to switch, but it genuinely interests me how Vi users put up with the constant need to strain their pinky to switch to command mode.




> it genuinely interests me how Vi users put up with the constant need to strain their pinky to switch to command mode.

Is it any different from how emacs users put up with Ctrl/Alt?

You aren't looking to switch, but if anybody is, install this https://github.com/tpope/vim-rsi for basic keybinding in insert mode. This is quite a short file. If you want, you can simply copy it to your .vimrc. For non-basic movement/editing, switch to normal mode and edit.


You've got a couple of options here - I personally have remapped my Caps Lock key to escape (not many downsides, besides limiting my ability to post humorous trolling messages).

You can also use Ctrl-[ which I believe essentially sends an escape character to whatever program you happen to be running.

Both options should save your pinky!


Ctrl-[ is the ASCII for Esc. Ctrl effectively subtracts 0x40. So:

    Ctrl-A = 0x41 - 0x40 = 0x01 = SOH
    Ctrl-I = 0x49 - 0x40 = 0x09 = Tab
    Ctrl-M = 0x4D - 0x40 = 0x0D = CR
    Ctrl-[ = 0x5B - 0x40 = 0x1B = Esc
    Ctrl-@ = 0x40 - 0x40 = 0x00 = NUL


I've heard of people rebinding it to caps lock. It makes sense as long as you don't mind holding down shift for the occasional all-caps text.


I remapped it to 'jk'. I don't think I've seen any vim users using 'esc' key to go to normal mode.


Then the single 'j' becomes slow...


well, I DO use ESC when leaving Visual mode... but otherwise, 'jk' all the way.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: