msysgit vim cursorline is dark on my light background. how to set it to light or off - windows

I have msysgit version 1.7.0.2-preview20100309 on windows 7
and my console windows has light background with dark text
when I open a file in vim (the vim included in msysgit)
I get cursorline highlight in dark color so I can't really see my text
for my own installation of gvim I use github256 color scheme but that has no effect in console.
I have looked at /share/vim/vimrc to see what's set there.
I changed cursorline to 'set nocursorline' and 'set background=light' but it has no effect.
How do I style my vim in msysgit?
How do I get rid of this dark cursorline
thanks

You can explicitly set the syntax coloration by specifying something like the following:
hi CursorLine guibg=#ffffff guifg=#000000 gui=NONE ctermbg=white ctermfg=black cterm=NONE term=reverse
You can include the above line your '~/.vimrc'. However, in the ideal case, setting the CursorLine highlight should be done in by the color scheme file being sourced by '~/.vimrc'. Most (well-written) color schemes should define a suitable CursorLine highlight as a matter of course. I would suggest using something like Pyte or my own MayanSmoke.

Related

OSX Terminal/Vim Syntax Colors

I've spent a bunch of time going over my Vim and Tmux configurations lately, trying to refine my workflow and I have come across a (small but annoying) problem that is stumping me. I am currently using OSX, but I have had the same issue with Windows' terminal/powershell.
My issue is that I am unable to change the brown color that appears in the default vim syntax highlighting which is used many of the languages that I write in. The color that I am speaking of can be seen in this vim colortest:
In the default OSX terminal (and in powershell) you can set the ANSI colors via terminal preferences, however, the brown color is not included in the GUI configuration options. This results in some ugly syntax highlighting that does not fit in with my desired color scheme:
My question is, what is the most portable way to change this default color? I would love to be able to do something in my .vimrc that would just work around this ugly color so I don't have to reconfigure colors for any system that I might be on, but I understand this might not be possible. Another route would be changing the syntax highlighting colors, but my investigations into that have so been unfruitful.
Thanks!
Appedix:
Colors selected in OSX profile for screenshots:
Sadly, the default Vim colorscheme is not as tidy as one would hope. In this case, Brown is a bit of a "catchall" name that ends up being interpreted differently in different contexts.
In GUI Vim, Brown refers to the "Brown" in X11's rgb.txt: #A52A2A.
In TUI Vim with &t_Co == 256, you get #af5f00, AKA 130 in the "xterm palette".
In TUI Vim with &t_Co == 16 or &t_Co == 8, you get your terminal palette's "Yellow", AKA 3.
By the looks of it, you seem to be affected by the second case.
While there exist ways to change the so-called "xterm palette" wholesale, you will have a hard time changing that specific color in a straightforward, non-messy way.
What you can do…
Do :set background=dark to force Vim to use a different set of default colors that doesn't include "Brown".
Choose a built-in or third-party colorscheme that doesn't use that specific color.
Override the Statement highlight group as explained in this gist with whatever color you want from the xterm palette.

Vim color scheme does not cover whole background

I'm using Zsh with agnoster theme and Vim.
When I try to change the color scheme of Vim, a bottom and left of screen are not applied by color scheme. First screenshot is before changing color scheme and the second id after changing color scheme. How can i fix this?
The left part is because that is the background of the LineNr column. You can change this with hi LineNr ctermbg=xxx.
The bottom is because vim isn't drawn in the whole screen in fullscreen mode. Unfortunately you can only fix this by changing the background in your terminal emulator's preferences to match vim's new background colour.

In vim, syntax color of terminal and iterm are different

I'm new in vim setting T__T.
left is terminal display.
right is iterm2 display.
how to change the color in terminal to be like in iterm2
Thanks in advance.
Could you try to set background color light in both terminal and iterm?
In Vim,
: set background=light
or you can add
set background=light
in your .vimrc
Also, unchecking "Draw bold text in bright colors" might fix the issue.
Some vim colorschemes, including the default, take the terminal's color palette as default color values. However, if you use a colorscheme with full 256 color support, I believe there's a 256 colorscheme for the default as well, the issue disappears.
Here's a photo with desert (non-256) as a colorscheme between iTerm and Terminal:
And here's a photo with jellybeans (256):

Cursor color in vim terminal OS X Mountain Lion

I want to make the cursor and selected text easier to read in vim (white background, black foreground), so i've done
hi Visual guibg=white guifg=black gui=NONE ctermfg=black ctermbg=white cterm=reverse
hi Cursor guibg=white guifg=black gui=NONE ctermfg=black ctermbg=white cterm=reverse
which gives me exactly what i want on MacVim. On the vim terminal, however, it defaults to the terminal preferences, which is very difficult to read and find...how can i override the terminal defaults?
Edit: to say that the hi Visual like works perfectly. It's the hi Cursor that doesn't.
You can't change the cursor colour programatically (i.e. just do it for vim), but you can change it in Terminal>Preferences>Profiles>Text>Cursor (see image), which may solve your issue.
I find a bright green cursor makes a big difference for visibility!
EDIT: This is mentioned in the comments, but I missed that the first time so I think it deserves its own answer.
I am not a Mac user, but I don't believe this is possible. The cursor colour in console Vim is inherited from the terminal application, and can't be modified.* You could try changing the cursor colour in the terminal preferences.
*Disclaimer: this is certainly true of the Windows command prompt, which I am forced to use at work. It wouldn't surprise me if other Unix-like shells were more flexible.

Vim color syntax highlighting changes not having any effect

I use vim on webfaction through putty and would like to change the colours used in the syntax highlighting. I have installed some example themes and then tried to change the colors in those themes to match the ones I want. For some reason this strategy does not work. What am I doing wrong? Is it because I'm using putty, or is it something weird with webfaction's linux or vim? Or is my logic just wrong?
I created /home/user/.vim/color/theme.vim
I then load the them by adding colorscheme theme to my /home/user/.vimrc
Aside from my color changes not working on obvious parts like
hi Normal guifg=#ffffff guibg=#000000 gui=none
it also does not seem to implement all the theme changes when I just use the theme without changing it. Is there something better than putty I can use?
In terminal mode, the ctermbg and ctermfg keys are used instead of guibg and guifg. It uses Xterm colors. See for example this table for a rough mapping, and even a VIM script that shows a color table.
So you would need to change your line to:
hi Normal ctermfg=15 ctermbg=0 guifg=#ffffff guibg=#000000 gui=none

Resources