I know that there can be a delay when inserting a new line with O after pressing Esc. However, I am experiencing that delay with o and i<CR> as well. This should not be related to vim 'waiting' as in the O case.

This occurs when inserting new lines towards the end of a 90-line Python file; it does not occur when editing other Python files.

I've isolated the problem to this line:

filetype indent on
  • 3
    Does this occurs when you start vim with vim -Nu NONE ? – nobe4 Jun 9 '16 at 12:11
  • 4
    then have a look at vi.stackexchange.com/a/2004/1821 and if you find the line that cause the problem you can update your question. – nobe4 Jun 9 '16 at 12:16
  • 2
    Nobe4's link is indeed a very good one, also check for lines involving ttimeout and ttimeoutlen they could be the culprits. – statox Jun 9 '16 at 12:19
  • 2
    See the doc: :h :filetype-indent-on. The line you're referring to makes Vim detect the filetype automatically and load the indent options for each filetype. Maybe an autocommand creates the problem on python buffers and is not loaded when you remove the filetype detection. – statox Jun 9 '16 at 12:39
  • 2
    @SabreWolfy strange. You've tried :verbose nmap O to see if there aren't any maps prefixed with O? Since you're saying this conditionally happens, there shouldn't be any, but it wouldn't hurt to check. At this point, I'd start disabling plugins to see which one is causing it, if any. – Tommy A Jun 9 '16 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.