http://snag.gy/0fZcU.jpg - Vim in MinTTY on Cygwin on Win7
http://snag.gy/bOP7g.jpg - Mutt in and on the same
In case it isn't obvious, part of the background is black while
other parts have the blue-greenish background color of the
"Solarized" theme for MinTTY that I'm sourcing from .bashrc.
Let me give you a brief note about Solarized here: It's a color
scheme for Vim (and other editors). Best for GUI version. Auther
recommends using Solarized colours for terminal version. Which is
readily available from github, see links below.
http://ethanschoonover.com/solarized - homepage
https://github.com/altercation/vim-colors-solarized - for Vim
https://github.com/mavnn/mintty-colors-solarized - for MinTTY
(By the way, using Solarized with GVim in Windows (and possibly
elsewhere) makes even the most horrible code look aweseome.)
So, the look is great in general, and the only problem is that
checkered background. I've seen that before when not using
Solarized, but now Solarized makes the problem reappear.
Does anyone on this list happen to know how this checkeredness
comes about and how to go about analyzing and removing the
problem? Have to admit that while I'm a longtime terminal user
I'm not knowledgeable about how they work. They usually just do
(especially MinTTY!), so no need to dig deeper.
Michael
> I see two problems combining to produce that effect.
>
> Firstly, the vim colour scheme appears to be using the default
> background colour for some of the syntax elements, whereas it's using
> ANSI black for the main background and other syntax elements, which
> seems wrong.
Setting the TERM variable to xterm-256color (via .bashrc or the MinTTY
options dialog) as you suggested below fixed this problem, or perhaps
rather covered it up by making the effect disappear.
> Secondly, that mintty version of the solarized scheme is lacking a
> setting for ANSI black, i.e. colour 0, whereas in the Xresources
> version for xterm & co it does have a setting.
https://github.com/altercation/solarized/blob/master/xresources-colors-solarized/Xresources
What would the line for ANSI black look like in the mintty version?
The script has lines such as:
echo -ne '\e]10;#657B83\a' # Foreground -> base00
echo -ne '\e]11;#002B36\a' # Background -> base03
echo -ne '\e]12;#93A1A1\a' # Cursor -> base1
echo -ne '\e]4;1;#DC322F\a' # red
What is the reference to understand that syntax? How is it different
from the ANSI escape sequences I have for my bash prompt, other than
that it does more colors?
\[\033[1;33m\]\u\[\033[0m\]@\[\033[1;31m\]\h\[\033[0m\]: …
http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
Okay, this page is helpful:
http://code.google.com/p/mintty/wiki/Tips#Changing_colours
The missing line for black appears to be the following:
echo -ne '\e]4;0;#000000\a' # black, or some blackish color
Looks like the escape sequences \e]10, \e]11, \e]12 and \e]4;0 - \e]4;15
are just the ways to address terminal color settings. If there's more to
it that might be worth knowing, thanks for sharing.
> Also, a warning regarding the 16-colour terminal version of solarized:
> it defines most of the bold ANSI colours to various shades of greenish
> grey. This will break applications that expect those colours to show
> up as something approaching their normal selves.
Thanks. I noticed that yellow being redefined to grey is not ideal.
There are two implementations of Solarized on Github:
https://github.com/mavnn/mintty-colors-solarized - the one I used
https://github.com/karlin/mintty-colors-solarized
> The vim colour scheme actually has support for using the 256 colour
> features of xterm and compatibles instead, which you can enable by
> setting TERM=xterm-256color.
As mentioned above, this helps for the Vim problem I had.
As for the Mutt problem, it was due to my Mutt colors (in muttrc) using
sometimes black and sometimes default as background color, which, as
you pointed out, seems wrong and resulted in the checkered background
observable on the screenshots, so I fixed it and everything is fine.
> As the README for the vim scheme rightly points out though, the 256
> colours available by default do not exactly match the solarized
> colours. However, those colours can actually be changed, both in xterm
> and in mintty, using the same control sequence as for changing the
> ANSI colours.
I remember doing this for MinTTY because blue on black was just too dark
to be easily read and needed lightening up. The need seems to have gone
away with newer releases, or I just can't find that setting in my rc
files for Bash and MinTTY and have forgotten where I store it. Anyway,
colors are documented on the Changing_colours page I referred to above.
Thanks.
Michael