From 450d847e42582ef2734015869c59c7d1fdd6b208 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Mon, 10 Jun 2019 23:40:23 +0200 Subject: Improved color schemes, indentation, autocompletion for text --- plugin/max-highlight-word-under-cursor.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'plugin/max-highlight-word-under-cursor.vim') 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() let l:currentword = escape(expand(''), '.') if(strlen(l:currentword) > 0) let w:m1=100 - silent! call matchadd('Underline', '\<'.l:currentword.'\>', -1, w:m1) + if(match(expand(''), '^#\x\{6\}') == 0) + exec 'highlight! CurrentColor guibg='.expand('') + hi CurrentColor + " silent! call matchadd('CurrentColor', escape(expand(''), '.'), -1, w:m1) + else + silent! call matchadd('Underline', '\<'.l:currentword.'\>', -1, w:m1) + endif endif endfunction -- cgit v1.2.3