diff options
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/max-fix-colorschemes.vim | 8 | ||||
-rw-r--r-- | plugin/max-highlight-word-under-cursor.vim | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/plugin/max-fix-colorschemes.vim b/plugin/max-fix-colorschemes.vim index d68c84a..c357117 100644 --- a/plugin/max-fix-colorschemes.vim +++ b/plugin/max-fix-colorschemes.vim | |||
@@ -1,6 +1,14 @@ | |||
1 | "======================================================================================================================= | 1 | "======================================================================================================================= |
2 | " COLOR SCHEME: | 2 | " COLOR SCHEME: |
3 | "======================================================================================================================= | 3 | "======================================================================================================================= |
4 | |||
5 | if &term == "linux" | ||
6 | set notermguicolors | ||
7 | else | ||
8 | set termguicolors | ||
9 | endif | ||
10 | |||
11 | |||
4 | function! ExtendColorTheme() | 12 | function! ExtendColorTheme() |
5 | highlight! Bold cterm=bold gui=bold | 13 | highlight! Bold cterm=bold gui=bold |
6 | highlight! Italic cterm=italic gui=italic | 14 | highlight! Italic cterm=italic gui=italic |
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 |