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, 5 insertions, 3 deletions
diff --git a/plugin/max-highlight-word-under-cursor.vim b/plugin/max-highlight-word-under-cursor.vim
index c6d6964..f18c212 100644
--- a/plugin/max-highlight-word-under-cursor.vim
+++ b/plugin/max-highlight-word-under-cursor.vim
@@ -11,10 +11,12 @@ 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 if(match(expand('<cWORD>'), '^#\x\{6\}') == 0) 14 let l:q = matchstr(expand('<cword>'), '\x\{6\}')
15 exec 'highlight! CurrentColor guibg='.expand('<cWORD>') 15 if(l:q != "")
16 exec 'highlight! CurrentColor guibg=#'.l:q
17 " call matchadd('CurrentColor', escape(expand('<cWORD>'), '.'), -1, w:m1)
18 " if(match(expand('<cword>'), '^#\x\{6\}\|^0x\x\{6\}') == 0)
16 hi CurrentColor 19 hi CurrentColor
17 " silent! call matchadd('CurrentColor', escape(expand('<cWORD>'), '.'), -1, w:m1)
18 else 20 else
19 silent! call matchadd('Underline', '\<'.l:currentword.'\>', -1, w:m1) 21 silent! call matchadd('Underline', '\<'.l:currentword.'\>', -1, w:m1)
20 endif 22 endif
..