-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Debounce key-presses to improve responsiveness
This idea is based on a patch from Yiding Jia, with some additional logic added to ensure that potentially expensive matching only occurs when really needed (ie. we don't re-match just because you hit a cursor up or down key). Not sure what the sweet spot for the debounce interval is, so starting with 50ms, and making it configurable. I suspect that on really large hierarchies you might want this to be higher (say, 100, 150 or even 200ms) in order to reduce the likelihood of unwanted match computations kicking off just because you happened to slow a little in typing. Note the use of augroups here to ensure that we don't keep adding more and more autocmds to the buffer (depending on the platform, the buffer will be cleaned up with bwipeout! or bunload!; in practice the same buffer is usually used over and over again, so we wind up with a single autocmd assigned to a buffer designated as `<buffer=2>` or similar). Signed-off-by: Wincent Colaiuta <win@wincent.com>
- Loading branch information
Showing
4 changed files
with
64 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters