开发者

In some moments vim works noticeably slowly

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 a开发者_JAVA百科nd 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).


May be you have a redefined key binding that starts with "O"... so VIM must wait to see if you are going to type the following keys

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜