diff options
Diffstat (limited to 'plugin/max-highlight-word-under-cursor.vim')
-rw-r--r-- | plugin/max-highlight-word-under-cursor.vim | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/plugin/max-highlight-word-under-cursor.vim b/plugin/max-highlight-word-under-cursor.vim deleted file mode 100644 index f18c212..0000000 --- a/plugin/max-highlight-word-under-cursor.vim +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | "======================================================================================================================= | ||
2 | " HIGHLIGHT_WORD_UNDER_CURSOR: | ||
3 | "======================================================================================================================= | ||
4 | |||
5 | let w:m1 = 0 | ||
6 | function! HighlightWordUnderCursor() | ||
7 | if(exists('w:m1') && w:m1 > 0) | ||
8 | silent! call matchdelete(w:m1) | ||
9 | let w:m1 = 0 | ||
10 | endif | ||
11 | let l:currentword = escape(expand('<cword>'), '.') | ||
12 | if(strlen(l:currentword) > 0) | ||
13 | let w:m1=100 | ||
14 | let l:q = matchstr(expand('<cword>'), '\x\{6\}') | ||
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) | ||
19 | hi CurrentColor | ||
20 | else | ||
21 | silent! call matchadd('Underline', '\<'.l:currentword.'\>', -1, w:m1) | ||
22 | endif | ||
23 | endif | ||
24 | endfunction | ||
25 | |||
26 | autocmd CursorHold,CursorHoldI * call HighlightWordUnderCursor() | ||