I've always used a light-background terminal and a dark-background editor (
vim). On this I'm not willing to compromise. In any case, I've just switched from
urxvt ($TERM == rxvt-unicode-256color) mainly to due an unresolved fontconfig/xft font truncation bug in xterm, and urxvt's ability to reflow text properly (there are other perks though, so please don't blindly suggest switching terminals). Unfortunately I have one problem with urxvt that I can't solve: the cursor color in vim is invisible. Let me explain with each terminal's default behaviour:
- cursor color defaults to the foreground color of the underlying text, and therefore varies. If there is no underlying text, it defaults to the foreground color (white or black, usually)
- text color under cursor is pulled to the background color (black or white, usually)
- XTerm ignores a cursorColor setting of "#000000" and instead uses default behaviour
Therefore, text under the cursor is only invisible in XTerm when the cursor color matches (as near as possible) the background color.
- cursor color defaults to black.
- text color under cursor is pulled to white.
Therefore, text under the cursor is only invisible in URxvt when the cursor color is white
Back to the problem:
The URxvt cursor is invisible in vim because I use a dark colorscheme (black cursor on black background). I can't change the cursor to color to white in
~/.Xdefaults because I use a light-background terminal, this would lead to a white cursor in a white background over white text: both invisible cursor and invisible font. However, while vim normally doesn't support changing the cursor color, with a little bit of hackery in
~/.vimrc it becomes possible. Unfortunately, a white or lighter-colored cursor leads to either invisible text or at least much less legible text.
- explanation: black cursor on black background.
- solution: change cursor color to white (or a lighter color)
- problem: leads to invisible text (or harder to read text)
- explanation: white cursor over white text
- solution: ????
I'm hoping either that URxvt can support XTerm's cursorColor/cursorTextColor behaviour, or at least support modifying the color of the text under the cursor, though of course I'm open to other solutions.