Added hicursorwords v0.2
This commit is contained in:
parent
bce734f742
commit
ef9128435a
@ -75,7 +75,7 @@ endfunction
|
||||
function! s:HiCursorWords__getWordUnderTheCursor(linestr, linenum, colnum)
|
||||
"let word = substitute(a:linestr, '.*\(\<\k\{-}\%' . a:colnum . 'c\k\{-}\>\).*', '\1', '') "expand('<word>')
|
||||
let word = matchstr(a:linestr, '\k*\%' . a:colnum . 'c\k\+')
|
||||
if a:linestr == word
|
||||
if word == ''
|
||||
return ''
|
||||
endif
|
||||
return '\V\<' . word . '\>'
|
||||
@ -111,7 +111,7 @@ function! s:HiCursorWords__startHilighting()
|
||||
augroup HiCursorWordsUpdate
|
||||
autocmd!
|
||||
autocmd CursorHold,CursorHoldI *
|
||||
\ let &updatetime = b:HiCursorWords__oldUpdatetime
|
||||
\ if exists('b:HiCursorWords__oldUpdatetime') | let &updatetime = b:HiCursorWords__oldUpdatetime | endif
|
||||
\ | call s:HiCursorWords__execute()
|
||||
augroup END
|
||||
endfunction
|
||||
|
Loading…
Reference in New Issue
Block a user