I have installed nord-vim plugin, and when I testing how it see the new plugin I saw the color variables very dark blue.
How can I change that color?
:set background=dark
You can use :set background=dark to switch to an alternate dark color scheme.
Setting this option does not change the background color, it tells Vim what the background color looks like.
To make the change permanent, put it in your ~/.vimrc.
Related
I added set background=dark in my .vimrc but my vim is still with a light background.
Am I missing something? Do I have to compile something so that my changes are used?
Edit:
I am Using a Debian Stretch distribution and I had to reinstall vim, because I failed to use SpaceVim, but this Problem occured before as well.
I have also noticed this text in .viminfo:
:set background=dark
|2,0,1555...47,,"set background=dark"
I don't understand this snippet but I guess that this would not hinder vim to get the setting out of .vimrc(?)
http://vimdoc.sourceforge.net/htmldoc/options.html#%27background%27
When set to "dark" or "light", Vim will try to use colors that look good on a dark (or light) background.
Setting this option does not change the background color, it tells Vim what the background color looks like.
I use urxvt with the Solarized light color palette. My .Xresources file is properly configured according to these instructions. I also use Vim as my main editor. I've installed the Solarized colorscheme for Vim and modified my .vimrc file according to these instructions. I like the light background color, so I put the following lines in .vimrc
syntax enable
set background=light
colorscheme solarized
However, Vim set the background color to dark. Then I edited the second line, wrote set background=dark and vim changed the background color to light.
The problem is that set background=light gives me the dark background and set background=dark gives me the light background. Why this weird behavior? How to fix this problem? Ah, if I leave out the set background line, everything looks fine (the background is light). I've also noticed that gvim sets the correct background color.
Well, I found what's going wrong. The official (?) Solarized for X Windows is broken when using light colors. There's a discussion here and here. The color scheme didn't adjust to the value of background. I solved the problem using the config from seletskiy configuration.
When I toggle the colortheme in vim from the dark to the light background, I'd also like to switch the termtrans option to off (and back on again), since I cannot change the background-color of the terminal. How can I accomplish this?
Context: I did set my terminal to the solarized colour palette with the dark background and transparency. I often code in vim with the solarized colortheme, also with the dark option. Since my terminal is transparent, I did set the option for transparent backgrounds. I like to write non-code text with the light color option. Therefore I can quickly toggle the color with the -Key. However, since termtrans has been set, the dark color of the terminal shows through and the terminal is not light at all then.
You can indeed change your terminal settings.
But it's simpler to ask for a light solarized theme again.
map your toggle to (I assume you use to toggle):
map <F5> :set background=light<CR>:let solarized_termtrans=0<CR>:colorscheme solarized<CR>
I have installed a color scheme called ashen.vim to my ~/.vimrc/colors folder. When I am in vim I am able to execute the color scheme by doing :colorscheme ashen, but the actual colors of the file do not change at all. (Color scheme downloaded from http://vimcolorschemetest.googlecode.com/svn/html/index-java.html ). Is there something else I need to do to 'activate' the color scheme?
You probably need to tell vim to use 256 colors. Add:
" 256-color terminal
set t_Co=256
To the top of your ~/.vimrc. Of course, if your terminal does not support 256 colors, this isn't really going to work.
When I try to change the background colors in .vimrc or directly in Vim using the command:
set background=dark
... it doesn't affect my background at all. Neither does the light option. However, it looks okay when I run gvim.
Is there a way to change the background in Vim without changing my Konsole settings?
EDIT Okay, there is a difference between guifg/guibg and ctermfg/ctermbg. While the GUI accepts lots of different color combinations, cterm allows only few standard ones.
As vim's own help on set background says, "Setting this option does not change the background color, it tells Vim what the background color looks like. For changing the background color, see |:hi-normal|."
For example
:highlight Normal ctermfg=grey ctermbg=darkblue
will write in white on blue on your color terminal.
In a terminal emulator like konsole or gnome-terminal, you should to set a 256 color setting for vim.
:set t_Co=256
After that you can to change your background.
Try adding
set background=dark
to your .gvimrc too. This work well for me.
Using set bg=dark with a white background can produce nearly unreadable text in some syntax highlighting schemes. Instead, you can change the overall colorscheme to something that looks good in your terminal. The colorscheme file should set the background attribute for you appropriately. Also, for more information see:
:h color
supplement of windows
gvim version: 8.2
location of .gvimrc: %userprofile%/.gvimrc
" .gvimrc
colorscheme darkblue
Which color is allows me to choose?
Find your install directory and go to the directory of colors.
in my case is:
%PROGRAMFILES(X86)%\Vim\vim82\colors
blue.vim
darkblue.vim
slate.vim
...
README.txt