aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2021-10-10 12:44:18 +0200
committerMax Christian Pohle2021-10-10 12:44:46 +0200
commitf9d13d8450ce640cc1efe725ef0b45f626fa38b8 (patch)
tree5434fe97b9cce03fad2a82fd26eff7ee4458b726
parent6ef2556ae020a8d04ee6e3b75d6df82bb2d9f6e1 (diff)
downloadvim-under-the-cursor-f9d13d8450ce640cc1efe725ef0b45f626fa38b8.tar.bz2
vim-under-the-cursor-f9d13d8450ce640cc1efe725ef0b45f626fa38b8.zip
Added end-of-word to syntax group
-rw-r--r--doc/vim-under-the-cursor.txt11
-rw-r--r--plugin/vim-under-the-cursor.vim2
2 files changed, 12 insertions, 1 deletions
diff --git a/doc/vim-under-the-cursor.txt b/doc/vim-under-the-cursor.txt
index a799d82..2b41372 100644
--- a/doc/vim-under-the-cursor.txt
+++ b/doc/vim-under-the-cursor.txt
@@ -9,4 +9,15 @@ can be activated with
9 9
10 :set termguicolors 10 :set termguicolors
11 11
12
13==============================================================================
14EXAMPLE *vim-under-the-cursor-example*
15
16 #ff0000
17 #ff000088
18 #00ff00
19 #00ff0088
20 #0000ff
21 #0000ff88
22
12vim:tw=78:ts=8:ft=help:norl: 23vim:tw=78:ts=8:ft=help:norl:
diff --git a/plugin/vim-under-the-cursor.vim b/plugin/vim-under-the-cursor.vim
index 403164a..66e661d 100644
--- a/plugin/vim-under-the-cursor.vim
+++ b/plugin/vim-under-the-cursor.vim
@@ -43,7 +43,7 @@ function! HighlightWordUnderCursor()
43 endif 43 endif
44 44
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('Underline', '\<'.l:currentword.'\>', -1, w:m1)
49 endif 49 endif
..