aboutsummaryrefslogtreecommitdiff
path: root/plugin/max-highlight-word-under-cursor.vim
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/max-highlight-word-under-cursor.vim')
-rw-r--r--plugin/max-highlight-word-under-cursor.vim8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugin/max-highlight-word-under-cursor.vim b/plugin/max-highlight-word-under-cursor.vim
index 2e7f5a0..c6d6964 100644
--- a/plugin/max-highlight-word-under-cursor.vim
+++ b/plugin/max-highlight-word-under-cursor.vim
@@ -11,7 +11,13 @@ function! HighlightWordUnderCursor()
11 let l:currentword = escape(expand('<cword>'), '.') 11 let l:currentword = escape(expand('<cword>'), '.')
12 if(strlen(l:currentword) > 0) 12 if(strlen(l:currentword) > 0)
13 let w:m1=100 13 let w:m1=100
14 silent! call matchadd('Underline', '\<'.l:currentword.'\>', -1, w:m1) 14 if(match(expand('<cWORD>'), '^#\x\{6\}') == 0)
15 exec 'highlight! CurrentColor guibg='.expand('<cWORD>')
16 hi CurrentColor
17 " silent! call matchadd('CurrentColor', escape(expand('<cWORD>'), '.'), -1, w:m1)
18 else
19 silent! call matchadd('Underline', '\<'.l:currentword.'\>', -1, w:m1)
20 endif
15 endif 21 endif
16endfunction 22endfunction
17 23
..