Closed lervag closed 6 years ago
At least, it seems trivial to allow to customize the CursorWord0
group. I see that there is some minor magic for the CursorWord1
group which might complicate things.
Try let g:cursorword_highlight = 0
, the plugin stops setting the highlight colors.
That seems close to what I want. And I guess I can achieve my desired customization with something like this:
let g:cursorword_highlight = 0
augroup cursorword
autocmd!
autocmd VimEnter,ColorScheme * call MyHighlight()
augroup END
function! MyHighlight() abort
highlight CursorWord0 cterm=bold gui=bold
redir => out
silent! highlight CursorLine
redir END
execute 'highlight CursorWord1 cterm=underline gui=underline'
\ matchstr(out, 'ctermbg=#\?\w\+')
\ matchstr(out, 'guibg=#\?\w\+')
endfunction
Thanks
It seems that the
cursorword#highlight
function overrides my attempts at customizing theCursorWord[01]
highlight groups. Would it be possible to make a minor change that allows me to customize these groups?