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
vim -Nu NONE? – nobe4 Jun 09 '16 at 12:11ttimeoutandttimeoutlenthey could be the culprits. – statox Jun 09 '16 at 12:19: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 09 '16 at 12:39filetype indent on. What's the output is when you run this::verbose set indentexpr? Try:set noautoindentand see if the problem goes away. You might be using a slowindentexpr. – Tommy A Jun 09 '16 at 12:45filetype indent onis not the actual cause of the problem and you only isolated a side effect. But I can be wrong... – statox Jun 09 '16 at 12:46indentexpr=GetPythonIndent(v:lnum)andLast set from /usr/share/vim/vim74/indent/python.vim.noautoindenthad no effect. – SabreWolfy Jun 09 '16 at 12:47:verbose nmap Oto see if there aren't any maps prefixed withO? 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 09 '16 at 13:48