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