Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim Command Line Escape Timeout

Tags:

vim

I'm having an issue with a delay when using <Esc> or <C-[> to get out of command line mode. It appears that vim is waiting to see if I'm going to enter a keymapping, and I've changed my ttimeoutlen and it doesn't change the delay but it's not really what I want. I'd prefer not to have any delay

I've done a :map to see if there are any mappings that expect a <Esc>... or <C-[>... but don't see any that do.

like image 244
Kevin Colyar Avatar asked Feb 22 '12 17:02

Kevin Colyar


1 Answers

Along with setting ttimeoutlen, do you also set ttimeout? This is needed to turn the feature on. I have the following in my .vimrc:

set ttimeout
set ttimeoutlen=100

Now I get no delay after ESC (even when running without the GUI), even though I have maps that involve ESC. For example:

if !has("gui_running")
    set <A-v>=<1b>v
endif

inoremap <A-v> <C-o>"+p

(note the <1b> above was written using "Ctrl-v ESC")

like image 138
Dan Stahlke Avatar answered Sep 22 '22 07:09

Dan Stahlke