Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the hold time of the cursor?

Tags:

vim

vi

When using the event trigger CursorHoldI I found that it takes about 3 seconds to execute the command.

Is there a way to decrease this time ?

like image 848
Sabrina Avatar asked Jan 01 '17 14:01

Sabrina


1 Answers

From :help CursorHoldI:

Just like CursorHold, but in Insert mode. [..]

And then from :help CursorHold:

CursorHold                      When the user doesn't press a key for the time
                                specified with 'updatetime'.
[..]

The default for updatetime is 4000 (4 seconds); you can change this to something like 1 second:

set updatetime=1000

Note that a very low value may slow Vim down, as some CursorHold commands may be comparatively expensive. It's also used for writing the swap file

like image 145
Martin Tournoij Avatar answered Sep 22 '22 05:09

Martin Tournoij