MacVim & Solarized background=light gives strange results. #597

Closed
chestone opened this Issue Jan 20, 2015 · 8 comments

Comments

Projects
None yet
4 participants
@chestone

After installing yadr I tried to switch to the light version of Solarized in MacVim and found some funky results shown below.

The end of my .vim/settings/yadr-appearance.vim is below.

  1 " Make it beautiful - colors and fonts
  2
  3 if has("gui_running")
  4   if has("gui_macvim")
  5     set background=light
  6     colorscheme solarized
  7   endif
  8
  9   "tell the term has 256 colors
 10   set t_Co=256
 11
 12   " Show tab number (useful for Cmd-1, Cmd-2.. mapping)
 13   " For some reason this doesn't work as a regular set command,
 14   " (the numbers don't show up) so I made it a VimEnter event
 15   autocmd VimEnter * set guitablabel=%N:\ %t\ %M
 16
 17   set lines=60
 18   set columns=190
 19
 20   if has("gui_gtk2")
 21     set guifont=Inconsolata\ XL\ 12,Inconsolata\ 15,Monaco\ 12
 22   else
 23     set guifont=Inconsolata\ XL:h17,Inconsolata:h20,Monaco:h17
 24   end
 25 else
 26   let g:CSApprox_loaded = 1
 27
 28   " For people using a terminal that is not Solarized
 29   if exists("g:yadr_using_unsolarized_terminal")
 30     let g:solarized_termcolors=256
 31     let g:solarized_termtrans=1
 32   end
 33 endif
 34
 35 set background=light
 36 colorscheme solarized

I have also tried adding the background & colorscheme to my .gvimrc, but to no success. Any help would be appreciated.

vim_broken_solarized

@chestone

This comment has been minimized.

Show comment
Hide comment
@chestone

chestone Jan 21, 2015

I've also tried adding these options 'set background=light' & 'colorscheme solarized' to my .vimrc.after and still the same result.

I've also tried adding these options 'set background=light' & 'colorscheme solarized' to my .vimrc.after and still the same result.

@romeroabelleira

This comment has been minimized.

Show comment
Hide comment
@romeroabelleira

romeroabelleira Jan 27, 2015

Setting Solarize > Background > Light Background makes the issue disappear, but the settings don't persist.
screen shot 2015-01-27 at 10 45 27

Setting Solarize > Background > Light Background makes the issue disappear, but the settings don't persist.
screen shot 2015-01-27 at 10 45 27

@chestone

This comment has been minimized.

Show comment
Hide comment
@chestone

chestone Jan 28, 2015

Yep. I am experiencing the same issue. I looked up the file where the menu is built
bundle/vim-colors-solarized/colors/solarized.vim
and this is what that menu item runs.

amenu &Solarized.&Background.&Light\ Background :set background=light \| colorscheme solarized<CR>

I've tried running this in my .vimrc.after file and still see the same issue.

Yep. I am experiencing the same issue. I looked up the file where the menu is built
bundle/vim-colors-solarized/colors/solarized.vim
and this is what that menu item runs.

amenu &Solarized.&Background.&Light\ Background :set background=light \| colorscheme solarized<CR>

I've tried running this in my .vimrc.after file and still see the same issue.

@brandonaaron

This comment has been minimized.

Show comment
Hide comment
@brandonaaron

brandonaaron Jan 30, 2015

I'm using the light theme with yadr successfully. I've modified my .vimrc (in my fork of the project... I assume adding to .vimrc.after should work fine as well) in the following way.

let g:yadr_disable_solarized_enhancements = 1
if !has("gui_running")
  let g:solarized_termtrans=1
endif
set background=light
colorscheme solarized

I'm using the light theme with yadr successfully. I've modified my .vimrc (in my fork of the project... I assume adding to .vimrc.after should work fine as well) in the following way.

let g:yadr_disable_solarized_enhancements = 1
if !has("gui_running")
  let g:solarized_termtrans=1
endif
set background=light
colorscheme solarized
@skwp

This comment has been minimized.

Show comment
Hide comment
@skwp

skwp Jan 30, 2015

Owner

You might have to move the disable_solarized into .vimrc.before and the rest into the after

Owner

skwp commented Jan 30, 2015

You might have to move the disable_solarized into .vimrc.before and the rest into the after

@chestone

This comment has been minimized.

Show comment
Hide comment
@chestone

chestone Feb 2, 2015

That works! Thank you so much @brandonaaron!

chestone commented Feb 2, 2015

That works! Thank you so much @brandonaaron!

@chestone chestone closed this Feb 2, 2015

@romeroabelleira

This comment has been minimized.

Show comment
Hide comment
@romeroabelleira

romeroabelleira Feb 3, 2015

@brandonaaron as @skwp noted, this worked perfectly:

~/.vimrc.before

let g:yadr_disable_solarized_enhancements = 1

~/.vimrc.after

if !has("gui_running")
  let g:solarized_termtrans=1
endif
set background=light
colorscheme solarized

@brandonaaron as @skwp noted, this worked perfectly:

~/.vimrc.before

let g:yadr_disable_solarized_enhancements = 1

~/.vimrc.after

if !has("gui_running")
  let g:solarized_termtrans=1
endif
set background=light
colorscheme solarized
@chestone

This comment has been minimized.

Show comment
Hide comment

chestone commented Feb 3, 2015

👍

sheax0r added a commit to sheax0r/dotfiles-2 that referenced this issue Aug 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment