Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

chestone opened this issue Jan 20, 2015 · 8 comments

Comments

@chestone
Copy link

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
Copy link
Author

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

@romeroabelleira
Copy link

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
Copy link
Author

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
Copy link

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
Copy link
Owner

skwp commented Jan 30, 2015

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

@chestone
Copy link
Author

chestone commented Feb 2, 2015

That works! Thank you so much @brandonaaron!

@chestone chestone closed this as completed Feb 2, 2015
@romeroabelleira
Copy link

@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
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants