From b6f9c6c0318caee7242f9426c39a1ae206275997 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Tue, 19 Oct 2021 06:33:25 +0200 Subject: Replaced Underline with `Underlined` hl group Because Underlined is already a standard according to :help group-name --- plugin/vim-under-the-cursor.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin/vim-under-the-cursor.vim b/plugin/vim-under-the-cursor.vim index 66e661d..cc31e36 100644 --- a/plugin/vim-under-the-cursor.vim +++ b/plugin/vim-under-the-cursor.vim @@ -45,13 +45,15 @@ function! HighlightWordUnderCursor() exec 'syntax clear ' . l:color exec 'syntax match ' . l:color . ' /\#' . l:q . '\>/' else - silent! call matchadd('Underline', '\<'.l:currentword.'\>', -1, w:m1) + silent! call matchadd('Underlined', '\<'.l:currentword.'\>', -1, w:m1) endif endif endfunction " set updatetime=100 -highlight! Underline cterm=underline gui=underline + +" see `:help group-name` +highlight! Underlined cterm=underline gui=underline autocmd CursorMoved,InsertLeave,TextChanged * call HighlightWordUnderCursor() " vim: expandtab tabstop=4 sw=4 -- cgit v1.2.3