Delay the highlight to help speed scrolling
stephenmm opened this issue · 3 comments
It would be nice to be able to delay the highlight so that when you are scrolling quickly through code there is no studdering.
This script is similar to this one and has the delay:
hicursorwords.vim http://www.vim.org/scripts/script.php?script_id=4306
I even tried to hack in the "delay" function from that script into yours but it did not work:
function! s:HiCursorWords__startHilighting()
let b:HiCursorWords__oldUpdatetime = &updatetime
let &updatetime = g:HiCursorWords_delay
augroup HiCursorWordsUpdate
autocmd!
autocmd CursorHold,CursorHoldI *
\ if exists('b:HiCursorWords__oldUpdatetime') | let &updatetime = b:HiCursorWords__oldUpdatetime | endif
\ | call s:HiCursorWords__execute()
augroup END
endfunction
So I thought I would ask if you guys knew how to do this or if you could add it to your script.
Thanks for the GREAT script!
Hmm... I initially used CursorHold
to trigger the highlight, and I can't remember why I switched to CursorMoved
, except that I don't want to mess with 'updatetime'
. I'll give it some more thought when I can, and I welcome more suggestions on how to solve this problem. Thanks for the input!
I would like to see delayed matching too!
+1!