diff options
author | Max Christian Pohle | 2019-06-10 23:40:23 +0200 |
---|---|---|
committer | Max Christian Pohle | 2019-06-10 23:40:23 +0200 |
commit | 450d847e42582ef2734015869c59c7d1fdd6b208 (patch) | |
tree | d8a051de440c9d581b20657bf446a7ddc474c4f6 /plugin/max-highlight-word-under-cursor.vim | |
parent | 7a09b882a53e44125488f8aab750b8bffed7b8ea (diff) | |
download | vim-karlmarks-450d847e42582ef2734015869c59c7d1fdd6b208.tar.bz2 vim-karlmarks-450d847e42582ef2734015869c59c7d1fdd6b208.zip |
Improved color schemes, indentation, autocompletion for text
Diffstat (limited to 'plugin/max-highlight-word-under-cursor.vim')
-rw-r--r-- | plugin/max-highlight-word-under-cursor.vim | 8 |
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 |
16 | endfunction | 22 | endfunction |
17 | 23 | ||