Custon HL group for word under cursor
The variable b:word_hl can now be set to set a custom highlighting group for the word-under-cursor functionality.
This commit is contained in:
parent
98e757172b
commit
8d5389a879
1 changed files with 6 additions and 1 deletions
7
vimrc
7
vimrc
|
@ -156,8 +156,13 @@ function! s:updateWUC()
|
|||
call matchdelete(b:hlwuc)
|
||||
end
|
||||
end
|
||||
if exists("b:word_hl")
|
||||
let hl = b:word_hl
|
||||
else
|
||||
let hl = "Underlined"
|
||||
endif
|
||||
let str = "\\<".escape(expand("<cword>"), "\\")."\\>"
|
||||
let b:hlwuc = matchadd("Underlined", str)
|
||||
let b:hlwuc = matchadd(hl, str)
|
||||
"echom str
|
||||
endfunc
|
||||
function! s:toggleWUC()
|
||||
|
|
Loading…
Reference in a new issue