Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently came across the timeout and ttimeout features in vim.

I use the key sequence jk to escape from insert to normal mode. I thought, following this article Mapping fast keycodes [see 2b], that i could have my jk seqence obey the ttimeoutlen while all my other mappings obey timeoutlen. This would be ideal because i can hit jk really fast when i want to so it wouldnt interupt my typing when i need to insert a jk into a document.

However, following the above mentioned article, it didnt work for me. I went

:set timeout timeoutlen=1000 ttimeoutlen=100
:set <F13>=jk
:map <F13> <esc>
:map! <F13> <esc>

and pressing j in insert mode gives a delay determined by my timeoutlen, not my ttimeoutlen.

What am i doing wrong? Is it even possible? Is it only possible for escape sequences? If so why? Thank you!

share|improve this question

I turned off my comp, woke up, turned it back on and now it seems to work....

Also i changed the above code to:

set timeout timeoutlen=1000 ttimeoutlen=100
set <f13>=jk
imap <F13> <esc>

I had this set last night and it didnt work so i dont know what the 'nights rest' did...

Anyways, to all that use jk or any other alphabet sequence to escape from insert mode, i recommend doing this.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.