Improved word-under-cursor matching to *only* match whole words

This commit is contained in:
Talia 2017-10-20 09:54:52 +02:00
parent 812e00aa3b
commit cf9ffa6148

4
vimrc
View file

@ -156,7 +156,9 @@ function! s:updateWUC()
call matchdelete(b:hlwuc)
end
end
let b:hlwuc = matchadd("Underlined", expand("<cword>"))
let str = "\\<".escape(expand("<cword>"), "\\")."\\>"
let b:hlwuc = matchadd("Underlined", str)
echom str
endfunc
function! s:toggleWUC()
augroup hlwuc