Live data from Hacker News

Vim esckeys

ksjoberg.com

11–15 of 15 posts

Re: Vim esckeys

#11

I forgot all about this problem ever since I remapped 'jk' to . Although when I was primarily using , I tried the timeoutlen and ttimeoutlen solution but couldn't really find any values that didn't conflict with my preference of delay allowed between entering personal map key sequences (other than the default, which is what partially causes the problem).

The combination of 'jk' to seems to be a very common solution. I use 'jj' to myself.

Re: Vim esckeys

#12
post #6

Having remapped my caplocks key to be escape, I find myself using it fairly often not just with vim but in all sorts of ways. Considering I never used it as caplocks before except accidentally I found the remapping a good investment.

I wish I could.

I'm using an U.S keyboard layout and need the ability to write ÅÄÖ sometimes(I'm from Sweden). I've customized my keyboard layout to switch three keys when caps lock is pressed.

Re: Vim esckeys

#13
Instead of Esc you can use Ctrl-C without any delay. I learned this years ago when the latency of a satellite Internet connection would interfere with Esc and Meta.

And, if you remap Caps Lock to Ctrl, Ctrl-C will be easier to type.

This works 99% of the time. The only exception I know of where it performs differently is in operations on a visual block (not visual line) selection -- hitting Ctrl-C only applies changes to the current line but Esc does what you want.

Re: Vim esckeys

#14
post #13

Instead of Esc you can use Ctrl-C without any delay. I learned this years ago when the latency of a satellite Internet connection would interfere with Esc and Meta. And, if you remap Caps Lock to Ctrl, Ctrl-C will be easier to type. This works 99% of the time. The only exception I know of where it performs differently is in operations on a visual block (not visual line) selection -- hitting Ctrl-C only applies change…

It's not well-explained in this article, but the problem is that when press a key like O in normal mode (to insert a line), vim will wait a certain amount of time to see if there's another key of a sequence about to follow. Reducing this timeout or disabling esckeys will reduce the or eliminate the wait time.

Re: Vim esckeys

#15
post #13

Instead of Esc you can use Ctrl-C without any delay. I learned this years ago when the latency of a satellite Internet connection would interfere with Esc and Meta. And, if you remap Caps Lock to Ctrl, Ctrl-C will be easier to type. This works 99% of the time. The only exception I know of where it performs differently is in operations on a visual block (not visual line) selection -- hitting Ctrl-C only applies change…

10ix

vs

10ix

^C cancels the current command, where ESC exits insert mode.

Post reply on HN