Closed vdrandom closed 7 years ago
Now that I've done some testing in a vte terminal with the default solarized cursor color (which inverts the colors of the selected cell) this commit makes sense. But I still think that it's not really compatible with the cursorline.
I see. This surely needs to be fixed. Boldface is meant as an additional visual aid, but using boldface as the only clue is a bug.
in my opinion, the way it worked before was perfect.
Other users (https://github.com/lifepillar/vim-solarized8/issues/11) have complained about a dark background to be confusing (and I agree). So, I have fixed this by leaving the background color unchanged, but setting the foreground to red, as in the original Solarized.
I don't think it fixes it since some syntax colouring (i.e. bash) makes parentheses red already. I've tried that change with my bashrc... and I've noticed no difference, not until I've tried that with a function declaration. :)
I don't think changing foreground colour would work here. Considering how few colours are available, collisions are inevitable.
That's no easy problem to solve. Using a darker background for some people has the side-effect that the matched character may look like a cursor. I'll think about it. If you have any idea, let me know.
hi MatchParen guifg=#002b36 guibg=NONE
would be kind of symmetric w.r.t. the dark theme, but maybe it does not stand out as much in the light theme.
No, it does not, although if bold font is enabled, it looks okay-ish. So far it is the best compromise.
I have updated MatchParen
and Cursor
so that matching characters are now visible with 'cursorline'
on and even without boldface. Details are in the commit messages. Please let me know whether this fixes this issue and https://github.com/lifepillar/vim-solarized8/issues/14. I'd also appreciate @ohjames's opinion on this update.
Aaaand there it is, everything is back to being awesome. :)
This basically fixes both issues (and, in fact, 100% matches my changes in the fork I've made for myself)
“Jumping” cursor may still appear on terminals that have the inverted cell colors for the cursor (vte terminals with unset cursor color, for example). But you have to compromise I guess.
Another possibility would be to use underline, as Atom does, e.g.:
hi! MatchParen gui=bold,underline guifg=#dc322f guibg=#eee8d5
The underline makes the matching parenthesis visible even if syntax colouring and/or cursorline hide the highlighting. @vdrandom What do you think about this instead of a dark background?
I propose to use underline for MatchParen
when g:solarized_visibility
is set to low
or normal
, and to use (also?) a dark background when g:solarized_visibility
is set to high
. The g:solarized_visibility
setting currently affects only CursorLineNr
, SpecialKey
, NonText
and Title
, so it should not be a big deal.
The current master implements my proposal above. @vdrandom would want to set g:solarized_visibility
to "high"
, while @ohjames should keep the normal visibility (he will see an additional underline, which helps spotting matching parentheses when cursorline
is on). Boldface adds to the visual differences, but it is never a requirement. This change avoids reverting https://github.com/lifepillar/vim-solarized8/commit/dc6c1dfa6f5c068ba338b8a2e4f88f4b6de4433a completely and, hopefully, will make everyone happy.
The above holds only for the light themes: nothing has changed in the dark themes.
Edit: I should add some screenshots in the Readme at some point…
Seems like an elegant enough solution and a nice compromise. I'll give it some time to see if it really works for me.
I'd say it's fine. Underlining + color + bold seems enough, even though I do prefer the high visibility variant.
dc6c1dfa6f5c068ba338b8a2e4f88f4b6de4433a has broken the way MatchParen is highlighted when
set cursorline
is configured and bold fonts are disabled. I agree that disabling bold fonts in the terminal is my own problem, but bold in my opinion is still not enough to distinguish the matching parentheses. (Not really sure if I can provide an alternative solution, but in my opinion, the way it worked before was perfect.)