From 3030e9da418798198ed8ca815fae06515f3170b3 Mon Sep 17 00:00:00 2001 From: Lifepillar Date: Thu, 25 May 2017 12:27:56 +0200 Subject: [PATCH] Make cursor color red or grey in light themes. This is the first of a couple of commits whose goal is to fix issues with Cursor and MatchParen highlights. In particular, we strive to find combinations that are pleasant and permit to distinguish matched parentheses easily. More about this in the next commit. --- colors/solarized8_light.vim | 2 +- colors/solarized8_light_flat.vim | 2 +- colors/solarized8_light_high.vim | 2 +- colors/solarized8_light_low.vim | 2 +- src/solarized8.vim | 10 +++++++++- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/colors/solarized8_light.vim b/colors/solarized8_light.vim index 40b564d..53699c5 100644 --- a/colors/solarized8_light.vim +++ b/colors/solarized8_light.vim @@ -116,7 +116,7 @@ hi! PmenuThumb ctermfg=11 guifg=#657b83 ctermbg=15 guibg=#fdf6e3 cterm=NONE,reve hi! CursorColumn cterm=NONE gui=NONE ctermfg=NONE guifg=NONE ctermbg=7 guibg=#eee8d5 hi! CursorLine cterm=NONE gui=NONE ctermfg=NONE guifg=NONE ctermbg=7 guibg=#eee8d5 guisp=#586e75 hi! ColorColumn cterm=NONE gui=NONE ctermfg=NONE guifg=NONE ctermbg=7 guibg=#eee8d5 -hi! Cursor cterm=NONE gui=NONE ctermfg=8 guifg=#002b36 ctermbg=4 guibg=#268bd2 +hi! Cursor cterm=NONE gui=NONE ctermfg=15 guifg=#fdf6e3 ctermbg=1 guibg=#dc322f hi! link lCursor Cursor if has('nvim') hi! link TermCursor Cursor diff --git a/colors/solarized8_light_flat.vim b/colors/solarized8_light_flat.vim index 4618a07..b57b69e 100644 --- a/colors/solarized8_light_flat.vim +++ b/colors/solarized8_light_flat.vim @@ -114,7 +114,7 @@ hi! PmenuThumb ctermfg=12 guifg=#839496 ctermbg=15 guibg=#fdf6e3 cterm=NONE,reve hi! CursorColumn cterm=NONE gui=NONE ctermfg=NONE guifg=NONE ctermbg=7 guibg=#eee8d5 hi! CursorLine cterm=NONE,underline gui=NONE,underline ctermfg=NONE guifg=NONE ctermbg=15 guibg=#fdf6e3 guisp=#586e75 hi! ColorColumn cterm=NONE gui=NONE ctermfg=NONE guifg=NONE ctermbg=7 guibg=#eee8d5 -hi! Cursor cterm=NONE gui=NONE ctermfg=8 guifg=#002b36 ctermbg=4 guibg=#268bd2 +hi! Cursor cterm=NONE gui=NONE ctermfg=15 guifg=#fdf6e3 ctermbg=11 guibg=#657b83 hi! link lCursor Cursor if has('nvim') hi! link TermCursor Cursor diff --git a/colors/solarized8_light_high.vim b/colors/solarized8_light_high.vim index 75aa4f2..2b13b2f 100644 --- a/colors/solarized8_light_high.vim +++ b/colors/solarized8_light_high.vim @@ -116,7 +116,7 @@ hi! PmenuThumb ctermfg=10 guifg=#586e75 ctermbg=15 guibg=#fdf6e3 cterm=NONE,reve hi! CursorColumn cterm=NONE gui=NONE ctermfg=NONE guifg=NONE ctermbg=7 guibg=#eee8d5 hi! CursorLine cterm=NONE gui=NONE ctermfg=NONE guifg=NONE ctermbg=7 guibg=#eee8d5 guisp=#073642 hi! ColorColumn cterm=NONE gui=NONE ctermfg=NONE guifg=NONE ctermbg=7 guibg=#eee8d5 -hi! Cursor cterm=NONE gui=NONE ctermfg=8 guifg=#002b36 ctermbg=4 guibg=#268bd2 +hi! Cursor cterm=NONE gui=NONE ctermfg=15 guifg=#fdf6e3 ctermbg=1 guibg=#dc322f hi! link lCursor Cursor if has('nvim') hi! link TermCursor Cursor diff --git a/colors/solarized8_light_low.vim b/colors/solarized8_light_low.vim index 21391ff..1a5df7c 100644 --- a/colors/solarized8_light_low.vim +++ b/colors/solarized8_light_low.vim @@ -116,7 +116,7 @@ hi! PmenuThumb ctermfg=11 guifg=#657b83 ctermbg=15 guibg=#fdf6e3 cterm=NONE,reve hi! CursorColumn cterm=NONE gui=NONE ctermfg=NONE guifg=NONE ctermbg=7 guibg=#eee8d5 hi! CursorLine cterm=NONE,underline gui=NONE,underline ctermfg=NONE guifg=NONE ctermbg=7 guibg=#eee8d5 guisp=#586e75 hi! ColorColumn cterm=NONE gui=NONE ctermfg=NONE guifg=NONE ctermbg=7 guibg=#eee8d5 -hi! Cursor cterm=NONE gui=NONE ctermfg=8 guifg=#002b36 ctermbg=4 guibg=#268bd2 +hi! Cursor cterm=NONE gui=NONE ctermfg=15 guifg=#fdf6e3 ctermbg=11 guibg=#657b83 hi! link lCursor Cursor if has('nvim') hi! link TermCursor Cursor diff --git a/src/solarized8.vim b/src/solarized8.vim index 9b649f5..020b785 100644 --- a/src/solarized8.vim +++ b/src/solarized8.vim @@ -485,7 +485,15 @@ for s:solarized_background in ["dark", "light"] call s:put("hi! CursorLine" .s:fmt_uopt .s:fg_none .s:bg_base02 .s:sp_base1) endif call s:put("hi! ColorColumn" .s:fmt_none .s:fg_none .s:bg_base02) - call s:put("hi! Cursor" .s:fmt_none .s:fg_base3 .s:bg_blue) + if s:solarized_background == "dark" + call s:put("hi! Cursor" .s:fmt_none .s:fg_base3 .s:bg_blue) + else + if s:solarized_contrast == "low" || s:solarized_contrast == "flat" + call s:put("hi! Cursor" .s:fmt_none .s:fg_base03 .s:bg_base0) " As in the original Solarized + else + call s:put("hi! Cursor" .s:fmt_none .s:fg_base03 .s:bg_red) + endif + endif call s:put("hi! link lCursor Cursor") call s:put("if has('nvim')")