Reputation: 4358
I have just started using VIM. The one thing that stains me most while using VIM is the Esc key. So after some googling I found this link: Avoid the escape key and used it to map jk to Esc. I put this command in _vimrc
file:
imap jk <Esc>
It's working fine. But now my question is if I need to type jk
in vim, how should I do it. One way is to type something like jik
then remove the i
. But is there any better way of doing it?
Upvotes: 0
Views: 101
Reputation: 1549
You can type Ctrl[. For me this is easier than reaching for the escape key. See:
:h i_CTRL-[
Upvotes: 1
Reputation: 172580
If you don't want to wait for the timeout, an alternative is pressing Ctrl + V somewhere, i.e. either <C-V>jk
or j<C-V>k
. This key combination means "insert next char literally". (On Windows, you often need to use <C-Q>
instead.)
Upvotes: 1
Reputation: 198324
timeoutlen
milliseconds (:help timeoutlen
, :set timeoutlen?
)jk
is a common choice because no English words contain it. If your language does, don't use it, or change it to something you are not likely to bump into.
Upvotes: 1