Vim CursorLine transparent light - vim

I have trouble understanding how the Vim color system works. I try to configure the color of my CursorLine with this code and the table below, but it doesn't work.
:highlight CursorLine ctermfg=White ctermbg=1 cterm=bold
https://github.com/guns/xterm-color-table.vim
When I put 1 for example, I have a blue color while the table says red.
What am I doing wrong?

I actually thought that the colors on the repository were the same for everyone. I didn't install the Plugin to check.
I need to install the plugin myself to check the colors specific to my terminal.
Thanks comments for pointing this out to me.

Related

Inverted colors in status line. Why?

I use gvim 7.4 on Windows, clean install, no plugins. Can anybody explain, why this:
highlight statusline guifg=red guibg=green
will show me green text on red background.
But this one:
highlight statusline gui=NONE guifg=red guibg=green
will show red text on green background?
(The actual goal was to change the text in statusline from bold to normal. For this task, I added gui=NONE and then, see this strange behaviour).
Edit
(As my answer to Kent's comment)
Here is my complete _vimrc. There are only two lines on code:
set laststatus=2
highlight statusline gui=NONE guifg=red guibg=green
Also tried:
hi gives the same effect as highlight
StatusLine gives the same effect as statusline
To check how was a hi-group defined, in vim use: hi GroupName, that's why I keep asking OP and Carpetsmoker to provide their cmd output.
After vim has been compiled and installed, some default HL-Groups have been already defined.
From time to time people asked about the default color scheme. And want to extend the "default" color scheme. The location is easy to find, on a linux box, e.g. it locates at /usr/share/vim/vim74/colors/default.vim, different distributions could have different paths.
However if we open the default.vim, we will see a rather simple vim file. No any HL definition. Because they were in vim source codes as default defined.
Regarding the StatusLine group, it was defined in syntax.c file:
https://github.com/vim/vim/blob/8bc189e81aa98ba4aebb03a9dc9527a210fce816/src/syntax.c#L6784
We can see that the reverse is in StatusLine and StatusLineNC groups.
To get rid of the reverse "feature", you have to overwrite the gui or cterm attribute.
This is because the default StatusLine is:
:hi StatusLine
StatusLine xxx term=bold,reverse cterm=bold,reverse gui=bold,reverse
Notice the reverse keyword in cterm and gui? That tells it to use reverse video.
This is also why the colours are what you expect if you use gui=NONE (or gui=bold).
hi gives the same effect as highlight
hi is just the abbreviated version of highlight.

VIM Background color issue

I want my vim background to be dark but as you can see it's not, its half black half grey, im using ubuntu 15.10 with latest vim version. How to fix this?
pic
If you want your background was of all the same colour, which is set in your colorsheme, you need to comment the line about highlighting nonText.
" highlight Normal ctermbg=black
" highlight nonText ctermbg=black
If you wish to override the settings in your colorscheme, just uncomment the line about highlighting Normal
highlight Normal ctermbg=black
highlight nonText ctermbg=black
If you want to see the current settings of the highlighting, you can use :highlight command.
Read more in help
:h highlight-groups

How to change color of border in NERDTree?

How to change color of border in NERDTree to be transparent?
This should be fairly straightforward. The NERDTree plugin gets its colour settings globally. So adding something like this in your .vimrc file should do the trick:
highlight VertSplit ctermbg=NONE
highlight VertSplit ctermfg=NONE
Just a heads up though - this will change the settings for everything that uses the VertSplit such as split windows etc. If this isn't what you want then perhaps try disabling only the background (ctermbg). These are commands for the terminal version as well so if you have a gui then it would be guifg=NONE and guibg=NONE (I think).
Edit: Also make sure that you have the line Syntax enable in your .vimrc too.

How to change the color of the left gutter in VIM?

In VIM, i'm using a default theme from someone else with tweaks. The color on the left
gutter is dark gray and this makes it hard to see the contents of my gutter (in this case it's vim-gitgutter).
Example:
How can I update the .vimrc to change this color?
Thanks
The gutter is called the sign-column in vim. It is controlled by the highlight group SignColumn
Example:
highlight SignColumn guibg=blue ctermbg=white
(This needs to be placed after you source your colorscheme)
This could have been found from the vim-gitgutter readme.
Locate the hi SignColumn in the colorscheme and play with the guibg and ctermbg values.

Make gvim 7.2 background black

I am sick and tired of the white background when I edit C/C++ etc. I want the black backround. That is what I currently have in my .vimrc file in regard to coloring. Please help me change it:
if !has('gui_running')
set t_Co=8 t_md=
highlight NORMAL ctermbg=black ctermfg=white
:help colorscheme
For example:
:colorscheme torte
Or, find a color scheme you like at vim.org.
Colors are controlled with the :highlight command Vim documentation: syntax , which allows you to specify colors for gvim (guifg and guibg) differently from colors for terminal vim (ctermfg and ctermbg).
All you have to do is make sure that the colors you assign to guifg and guibg are the same as you assign to ctermfg and ctermbg. Here's a script that might get you going: Xterm256 color names for console Vim
Depending on your colorscheme, the following command might work (it does depend on the colorscheme).
:set background=dark

Resources