Hello,
Change color of "block caret" is not the same that I have set to. For example I want my color of block caret to be 255 ; 204 ; 0 but in editor ends up being 179 ; 146 ; 13.
The color I have setup:
The color in editor (little bit darker):
Does anyone have the same issue? Does anyone know how to fix it?
edit: I think it's because caret is somehow transparent ¯_(ツ)_/¯
Can this transparency be disabled?
+1. 😞
It seems like green when I set the color to be yellow(255,255,0)
The default caret opacity is 65% and so the color you see is roughly two thirds that color and one third whatever the background color of the character under the cursor is. To get exactly your specified caret color, you can set the opacity to 100% in .vsvimrc
with :set vsvimcaret=100
.
The benefit to having the opacity lower than 100% is that the caret color is different from but related to whatever the background color is, which is presumably less jarring. For example, you can try setting a breakpoint (which on my system makes the text background a sort of brick red) and then positioning the caret on that line.
Unfortunately, it is currently impossible to change the color of the text under the cursor, so it quite difficult to get good contrast both within the caret and between the caret and the document. The traditional solution to this problem is the so-called "reverse video" where the foreground and background are swapped. The solution in gvim is that it allows you to set both the foreground and background of the block cursor as can be seen here (with :colorscheme desert
):
If the cursor foreground color were white in this image, the caret would be extremely hard to read, which is the current situation with VsVim:
@ricksladkey Nice, thanks for explanation.
You said that currently impossible to change the color of the text under the cursor
. Is it because of Visual Studio or do you think it can be done in plugin itself? Cheers.
@kkorus I believe it is a limitation in VsVim. Yet, it is an area I've wanted to look into, so I'll take a look at how hard it would be.
This issue would be resolved if issue #749 were implemented and the then default opacity was set to 100%.
I have a working prototype that allows user-configurable block caret text foreground and background color. Here it is in action editing VsVim itself. The options:
The results:
I'll test it out locally for a few days and if I don't see any problems, I'll submit a PR.
@ricksladkey Awesome news! Waiting for release.
Most helpful comment
I have a working prototype that allows user-configurable block caret text foreground and background color. Here it is in action editing VsVim itself. The options:
The results:
I'll test it out locally for a few days and if I don't see any problems, I'll submit a PR.