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

VIM + iTerm2, background colors #97

Closed
juhasz opened this issue May 1, 2011 · 10 comments
Closed

VIM + iTerm2, background colors #97

juhasz opened this issue May 1, 2011 · 10 comments

Comments

@juhasz
Copy link
Contributor

juhasz commented May 1, 2011

VIM background color in terminal mode is lighter then in terminal, and some text has darker background, and this darker background is same in the dark and in the light color scheme.

1. desire@desire-air:~ (bash) (80,23)

1. desire@desire-air:~/.vim/bundle/solarized (Vim) (80,23)

1. desire@desire-air:~/.vim/bundle/solarized (Vim) (80,23)

I think the problem is in this commit: altercation/vim-colors-solarized@7fdec56 between the 319 and 351 lines.

@altercation
Copy link
Owner

Download the new code from this github repo. I've done some extensive work on terminal mode Solarized.

@juhasz
Copy link
Contributor Author

juhasz commented May 2, 2011

???
There is no new code... (Last commit about 22 hours ago)

@altercation
Copy link
Owner

I'll start tagging Solarized with a version number command to ensure I know what code is running. Something is definitely buggy here, as the status line in Terminal.app should absolutely no longer be cyan or green.

  1. Can you confirm that "display ANSI colors" and "Use bright colors for bold text" are both checked in your Terminal.app prefs? (I assume they are)
  2. What termcap? What's $TERM right now on your end?
  3. What's the output of the Autogenerate Options menu command (you can run this in gui mode or in terminal mode via:

:emenu Solarized.Autogenerate\ options

@juhasz
Copy link
Contributor Author

juhasz commented May 2, 2011

Can you confirm that "display ANSI colors" and "Use bright colors for bold text" are both checked in your Terminal.app prefs? (I assume they are)

I use iTerm.app (iTerm2)

What termcap? What's $TERM right now on your end?

xterm

:emenu Solarized.Autogenerate options

" lazy method of appending this onto your .vimrc ":w! >> ~/.vimrc"
" ------------------------------------------------------------------
" this block of commands has been autogenerated by solarized.vim and
" includes the current, non-default Solarized option values.
" To use, place these commands in your .vimrc file (replacing any
" existing colorscheme commands). See also ":help solarized"

" ------------------------------------------------------------------
" Solarized Colorscheme Config
" ------------------------------------------------------------------
let g:solarized_diffmode="high" "default value is normal
syntax enable
set background=dark
colorscheme solarized
" ------------------------------------------------------------------

" The following items are available options, but do not need to be
" included in your .vimrc as they are currently set to their defaults.

" let g:solarized_termtrans=0
" let g:solarized_degrade=0
" let g:solarized_bold=1
" let g:solarized_underline=1
" let g:solarized_italic=1
" let g:solarized_termcolors=16
" let g:solarized_contrast="normal"
" let g:solarized_visibility="low"
" let g:solarized_menu=1

@vguerci
Copy link

vguerci commented May 2, 2011

I've just checked the background toggle with iTerm2 (Build 0.20.20110428) + latest solarized vim plugin installed via janus.
That works perfectly for me, a good surprise, last time I tried it was failing.

Here are my settings :

  • Draw bold text in bright colors:

    • unchecked (or my LSCOLORS doesn't work, would love the 256colors/dircolors @seebi support with iTerm2 btw ;)
    • but anyway, it doesnt look like having any effect on background toggle
  • $TERM = xterm-256color

  • My solarized options:

     syntax enable
     set background=light "(or dark)
     colorscheme solarized
     let g:solarized_visibility =  "low"
    

Hope that helps, loving Solarized, great work ethan! @altercation

Vincent.

@seebi
Copy link

seebi commented May 2, 2011

@vguerci - I think your bsd ls from mac does not support ls colors ... sorry.

@altercation
Copy link
Owner

@vguerci -

Thanks for the data. One note is that the let g:solarized_visibility = "low" line should come before colorscheme solarized otherwise it won't apply properly (though it doesn't matter in this case as 'low' is now the default value as noted in the autogenerate options output).

Sorry I confused Terminal and iTerm for a moment... to confirm: even with ToggleBG working now, are you still seeing the same color problems as displayed in your screenshots above? If so we can continue to troubleshoot.

If you are indeed still having this problem, can you try running in Terminal.app and see if the same problem manifests?

-es

@vguerci
Copy link

vguerci commented May 2, 2011

@seebi, I know, but that's not my problem, I tried with GNU one. I think it fails because of... erm, damn me. Just checked, and right now it works. Sorry for annoying you!.. And nice job, I like your lscolors contribution :)

@altercation sorry for confusing you, but I'm not the one who opened that issue, just checked on my configuration, which is really similar to @juhasz, who opened this. My guess is that he has something misconfigured/not up to date.

@altercation
Copy link
Owner

@vguerci, thanks. Lesson learned, I'll double check the original issue poster next time ;)

@juhasz, The problem is your $TERM value. You need to set your iTerm2 profile preference "Terminal Emulation" (under the Terminal tab in profiles for your active profile) to "xterm-256color". Please try this and reopen this issue if you are having problems.

@juhasz
Copy link
Contributor Author

juhasz commented May 2, 2011

Yes, this was the problem. Now it works fine.
Thanks to all.

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