Add a new option to choose the original Solarized's cursor style.
So, by default now the cursor is white on blue in dark themes and white
on orange/red (depending on visibility) in light themes no matter which
variant is used.
If you prefer a grey cursor, as in the original Solarized, put this in
your `vimrc`:
let g:solarized_old_cursor_style = 1
With normal and low visibility, now the cursor is orange (normal, high
contrast variants) or grey (flat, low variants).
With high visibility, now the cursor is red (normal high contrast
variants) or (darker) grey (flat, low variants).
In order to avoid reverting dc6c1df completely, this commit introduces
underline as a further clue to distinguish matching parentheses. In the
normal and high contrast variants, underline is used for MatchParen when
g:solarized_visibility is set to "low" or "normal", while a dark
background is used when g:solarized_visibility is set to "high". For
flat and low contrast variants, underline is used when
g:solarized_visibility is set to "high" (otherwise, the appearance is
the same as before this commit).
In order to address
https://github.com/lifepillar/vim-solarized8/issues/14
and further concerns in
https://github.com/lifepillar/vim-solarized8/issues/15
in the previous commit and in this one I have updated Cursor and
MatchParen highlighting, respectively.
The current colors are based on the following considerations:
1. The Solarized palette has only two "whites": the ligther is used in
all variants but "low", which uses the darker.
2. Matching parentheses should be distinguishable even if bold face is
disabled.
3. The cursor and matching parentheses should be easily distinguishable
even when 'cursorline' is on. Before the recent commits this was not
the case.
4. MatchParen's background may be set to NONE in the "low" and "flat"
variants, because CursorLine uses underline. It should be set to
something different in the other two variants, otherwise it may
become impossible to see a matching character.
5. MatchParen's foreground color shouldn't be red if MatchParen's background
color is not set to something different from the normal background.
This is because several syntax files use red to highlight parentheses
by default. If bold fonts are not used, matching parentheses may be
not be visible at all.
6. I don't like red on grey (see MatchParen in original Solarized) or
red next to grey.
So, these are the choices I've made:
- In the normal and high contrast variant the cursor is now orange and
MatchParen's background is grey (with white foreground, see 6 above).
This achieves the twofold goal of being able to see a matching
parenthesis when 'cursorline' is on and being able to clearly
distinguish the cursor from the matching parenthesis. Orange is
preferred to red because of 6 (with two consecutive parentheses
you have a grey block and an orange block next to each other).
- In the flat and low contrast variant the cursor is grey, exactly as in
the original Solarized. This choice is made because such variants
should have less contrast in general, and because 'cursorline' poses
no problem as it does not change the text background.
- The flat variant uses the colors that were used previously for all the
variants. Even without boldface, the matching parenthesis can be seen
because it has a slightly darker background (see 1).
- The low contrast variant uses the darker white for the normal
background, so MatchParen has a transparent background and a nearly
black foreground. This does not particularly stand out without
boldface, but hey, it's low contrast.
This is the first of a couple of commits whose goal is to fix issues
with Cursor and MatchParen highlights. In particular, we strive to find
combinations that are pleasant and permit to distinguish matched
parentheses easily. More about this in the next commit.
In light themes, when cursorline is on and bold fonts are not used,
MatchParen highlighting is not visible. This commit solves the problem
by setting the foreground color to red, as in the original Solarized.
Fixes https://github.com/lifepillar/vim-solarized8/issues/15.
Problem: MatchParen highlighting in light themes inverts colors of
bracket, makes it look like cursor has jumped to matching bracket.
Solution: keep the parenthesis's foreground color when highlighted, and
make the background slightly darker instead of grey.
Fixes https://github.com/lifepillar/vim-solarized8/issues/11.
For all schemes other than the flat one, when g:solarized_contrast is
not low, use the same colors as the original Solarized for the status
line, with the exception of the dark high-contrast scheme, where the
colors of StatusLine have been darkened a bit to make them compatible
with WildMenu.
For some reason, using ctermbg=7 causes the ^^^ symbols to appear in the
status line when the high contrast variant is active. That happens both
in terminal and in MacVim. Setting the foreground to 15 fixes the
problem (that is high contrast anyway).