diff options
author | Max Christian Pohle | 2021-10-19 06:33:25 +0200 |
---|---|---|
committer | Max Christian Pohle | 2021-10-19 06:33:25 +0200 |
commit | b6f9c6c0318caee7242f9426c39a1ae206275997 (patch) | |
tree | 51534f9a22cfbfe93df2b714302a09d2fc5db5f3 | |
parent | f9d13d8450ce640cc1efe725ef0b45f626fa38b8 (diff) | |
download | vim-under-the-cursor-b6f9c6c0318caee7242f9426c39a1ae206275997.tar.bz2 vim-under-the-cursor-b6f9c6c0318caee7242f9426c39a1ae206275997.zip |
Replaced Underline with `Underlined` hl group
Because Underlined is already a standard according to :help group-name
-rw-r--r-- | plugin/vim-under-the-cursor.vim | 6 |
1 files 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() | |||
45 | exec 'syntax clear ' . l:color | 45 | exec 'syntax clear ' . l:color |
46 | exec 'syntax match ' . l:color . ' /\#' . l:q . '\>/' | 46 | exec 'syntax match ' . l:color . ' /\#' . l:q . '\>/' |
47 | else | 47 | else |
48 | silent! call matchadd('Underline', '\<'.l:currentword.'\>', -1, w:m1) | 48 | silent! call matchadd('Underlined', '\<'.l:currentword.'\>', -1, w:m1) |
49 | endif | 49 | endif |
50 | endif | 50 | endif |
51 | endfunction | 51 | endfunction |
52 | 52 | ||
53 | " set updatetime=100 | 53 | " set updatetime=100 |
54 | highlight! Underline cterm=underline gui=underline | 54 | |
55 | " see `:help group-name` | ||
56 | highlight! Underlined cterm=underline gui=underline | ||
55 | autocmd CursorMoved,InsertLeave,TextChanged * call HighlightWordUnderCursor() | 57 | autocmd CursorMoved,InsertLeave,TextChanged * call HighlightWordUnderCursor() |
56 | 58 | ||
57 | " vim: expandtab tabstop=4 sw=4 | 59 | " vim: expandtab tabstop=4 sw=4 |