-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
revert MatchParen color changes #44
base: master
Are you sure you want to change the base?
Conversation
Why would this only affect the terminal version? What color is the cursor in the GUI version? The matched parens are orange. I do not see the cursor being set to orange anywhere in this plugin, can you point to it? |
The changes is better. |
I also believe that the current colors on MatchParen are a little disorienting. To demonstrate:
If we go vertically the problem becomes even more apparent. It feels as if the cursor suddenly jumps away despite moving steadily up or down.
These were taken on Ubuntu 14.04 (vbox), using vim and tmux in gnome-terminal. Relevant configuration files: .vimrc
.bashrc
.tmux.conf
|
Then |
@shime Always happy to help! @justinmk Indeed, we have not approached the issue correctly. It seems that the issue is caused by the fact that the cursor seems to be "disappearing" when it goes on a parenthesis or a bracket but only on the terminal version. vim terminal version (cursor "disappears" on brackets and parentheses) Unfortunately I am not able to pinpoint why that happens. Any ideas? |
Doesn't happen in my terminal. Note that I have my terminal cursor set to not blink. At any rate this is not a colorscheme issue. |
@justinmk I set my cursor to not blink as well but it still "disappears". I assumed that it might be a color scheme issue (only for terminals) since it seems that the cursor becomes the same color as the background when it goes to a bracket or parenthesis (and when using the default color scheme I do not have that issue). Ideally both the cursor and the matched parenthesis should remain visible. But since that doesn't happen on your terminal maybe it's a problem that just me and @shime have, or maybe platform specific (Ubuntu, gnome-terminal for me). |
yup, I'm using gnome-terminal too. |
+1 I jus to apply this patch to my own molokai fork and now I can look to my brakets and parentesis without stress :D |
VTE's cursor is, by default, a full rectangle which reverses the colors underneath. Moreover, if blinking is enabled, (as clearly seen on the gifs above before the problem occurs) blinking restarts with a complete "on" phase after each cursor movement. I suspect that this color scheme highlights both parentheses, that is, both the one under the cursor and its counterpart. Hence at the cursor's cell a double reverse make it look like it wasn't changed. I think it'd be a better approach for the color scheme to highlight the counterpart only, and not the one under the cursor. In GNOME Terminal's Profile Preferences you can change the cursor shape to I-Beam or Underline (see https://bugzilla.gnome.org/show_bug.cgi?id=772134 for how make them wider) (I personally use I-Beam which works wonderfully in every app except vim which has an IMO crazy braindamaged legacy idea about the cursor, being one of the reasons I don't use vim), and you can also specify a concrete foreground+background color pair for the cursor. Either of these could mitigate the problem. |
Ah yes. Thank you very much for the input @egmontkob . I really don't know much about the subject (obviously), but here's what I've gathered so far:
In this case, VTE's method of cursor-coloring does not seem like a "special snowflake" and this definitely seems like an issue with the colorscheme. But I'm also now seeing e7bcec7 ... there's just no easy way to solve this problem. |
That behavior change would need to be made in Vim's matchparen plugin, rather than the colorscheme. |
I guess it might be worth to file a feature request. Your call. |
@ddaza For the colors see https://commons.wikimedia.org/wiki/File:Xterm_256color_chart.svg . |
thanks @egmontkob cyan === 014 hi MatchParen ctermfg=014 ctermbg=208 cterm=bold This totally works I dunno how peeps feel about this change. |
@ddaza - I think that's a great solution. It may not look the prettiest, but it does what it needs to do and will probably work nicely in both terminal and GUI. Do you think it would be a good idea to use color 081 (#5fd7ff) instead, since that color is already used in the colorscheme? I don't think cyan is used anywhere. |
I think reverting the colors as suggested before looks even better. It only affects the terminal version anyways. |
The original molokai highlighting made it look like the cursor was jumping to the far bracket which was very disconcerting. There is a discussion and example on the pull here - tomasr#44 In that pull the colors are simply reversed, I've tweaked them slightly so that the far cursor is a bit easier to spot by having a lightened background.
They make matched parens look exactly the same as the cursor. This is very confusing, so revert that change.