vim-matchmaker icon indicating copy to clipboard operation
vim-matchmaker copied to clipboard

Delay the highlight to help speed scrolling

Open stephenmm opened this issue 11 years ago • 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!

stephenmm avatar Jan 24 '14 19:01 stephenmm

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!

qstrahl avatar Jan 24 '14 21:01 qstrahl

I would like to see delayed matching too!

noscript avatar Apr 06 '14 10:04 noscript

+1!

cpixl avatar Apr 23 '14 14:04 cpixl