In some moments vim works noticeably slow. When I'm in normal mode in 100 line file, type "O" (uppercase letter o) it appears about 1-2 seconds and only then above of current line new empty line is created in insert mode (that is normal behavior). And I want to know possible reasons why this happens...
I have quite powerful computer, So the problem is not in computer.
Are you hitting <Esc>
then O
in very rapid succession? If so, you are seeing the delay due to certain terminal escape sequences beginning with <Esc>O
. Vim has to wait to see if you are actually typing one of those sequences.
To see this for yourself, in insert mode type <Esc>OA
and your cursor should move up. Pressing <Ctrl-v><Up>
in insert mode will show you the escape code generated.
Type :map O
If you have a normal mapping starting with a capital O
, it might be possible that Vim is waiting for a timeout to be sure that you are not starting to type a complex command.
Typically, the timeout default is of 1 second.
See :help timeout
and :help timeoutlen
.
If you do have a mapping starting with O
, you can find where it is defined with :verbose map
. You can then disable it or modify it (or remove the plugin defining the mapping).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With