altercation / vim-colors-solarized

precision colorscheme for the vim text editor
http://ethanschoonover.com/solarized
6.58k stars 1.75k forks source link

CursorColumn is not visible when let g:solarized_contrast = "low" #217

Open rysktky opened 4 years ago

rysktky commented 4 years ago

Normal and CursorColumn has same background color when 'let g:solarized_contrast = "low"' This makes CursorColumn invisible.

:echo &background
dark
:hi Normal
Normal         xxx ctermfg=12 ctermbg=0
:hi CursorColumn
CursorColumn   xxx ctermbg=0 guibg=Grey40

:echo &background
light
:hi Normal
Normal         xxx ctermfg=11 ctermbg=7
:hi CursorColumn
CursorColumn   xxx ctermbg=7 guibg=Grey90

Maybe set it to 8 and 15 for dark and light? GUI has the same problem too.

rysktky commented 4 years ago

OK, lazy way could be this. This will set base03 to CursorColumn, CursorLine, LineNr as well. Visual gets revers with proper contrast as well.

--- a/colors/solarized.vim
+++ b/colors/solarized.vim
@@ -406,7 +406,9 @@ if g:solarized_contrast == "high"
 endif
 if g:solarized_contrast == "low"
     let s:back        = s:base02
-    let s:ou          = ",underline"
+    let s:temp02      = s:base02
+    let s:base02      = s:base03
+    let s:base03      = s:temp02
 endif
 "}}}
 " Overrides dependent on user specified values and environment "{{{

Or the original did not do like above in order to make it less colorful. Then maybe we can write if-statement for each highlight like this.

--- a/colors/solarized.vim
+++ b/colors/solarized.vim
@@ -667,7 +667,11 @@ exe "hi! PmenuThumb"     .s:fmt_none   .s:fg_base0  .s:bg_base03  .s:fmt_revbb
 exe "hi! TabLine"        .s:fmt_undr   .s:fg_base0  .s:bg_base02  .s:sp_base0
 exe "hi! TabLineFill"    .s:fmt_undr   .s:fg_base0  .s:bg_base02  .s:sp_base0
 exe "hi! TabLineSel"     .s:fmt_undr   .s:fg_base01 .s:bg_base2   .s:sp_base0  .s:fmt_revbbu
+if ( solarized_contrast == 'low' )
+exe "hi! CursorColumn"   .s:fmt_none   .s:fg_none   .s:bg_base03
+else
 exe "hi! CursorColumn"   .s:fmt_none   .s:fg_none   .s:bg_base02
+endif
 exe "hi! CursorLine"     .s:fmt_uopt   .s:fg_none   .s:bg_base02  .s:sp_base1
 exe "hi! ColorColumn"    .s:fmt_none   .s:fg_none   .s:bg_base02
 exe "hi! Cursor"         .s:fmt_none   .s:fg_base03 .s:bg_base0