14

I'm working on a side project with both JavaScript and SQL source files. When I'm editing the JavaScript, Vim behaves normally. However, when I'm editing the SQL files, there's about a one-second delay between when I press CtrlC and when Vim exits insert mode. When I use the Escape key, or ShiftEnter which I mapped in my ~/.vimrc as a test, it shows no delay.

I thought perhaps it was something to do with the syntax highlighting, but when I ran :syntax off to try and fix it, the delay still showed up. I also tried :setf text, which also did not work. I have only a couple of plugins installed (CtrlP, NerdTree, and highlighters for Jade, Less, and CoffeeScript) so I don't think that's what's interfering.

Does anyone know what could be going on?

2
  • 2
    What is ttimeoutlen value?
    – cuonglm
    Commented Aug 13, 2014 at 18:08
  • Does :map show anything for CTRL-C? What if you :set filetype=text and try? Commented Aug 13, 2014 at 18:52

1 Answer 1

12

You seem to have a filetype plugin that installs a buffer-local mapping for Ctrl-C. You can check with

:verbose imap <buffer> <C-c>

It's probably the default one, cp. :help ft_sql. The prefix key can be reconfigured via this (in your ~/.vimrc):

let g:ftplugin_sql_omni_key = '<C-j>'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .