I've tried
syntax on
let g:solarized_termcolors=256
set t_Co=256
set background=dark
colorscheme solarized
but it doesn't look like GVim, how can I achieve that?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this communityI've tried
syntax on
let g:solarized_termcolors=256
set t_Co=256
set background=dark
colorscheme solarized
but it doesn't look like GVim, how can I achieve that?
According to the readme of the vim sector of ethan's solarized colorscheme, you need to set the colorscheme of your terminal explicitly. You can take a look at base 16. Install it, and run base16_solarized-dark
. Then vim will, hopefully, show the colors properly. And also put this in your vimrc:
set termguicolors
in place of
set t_Co=256
I faced the same issue couple of weeks ago.
If you look inside of solarized.vim
, you will find a section GUI & CSApprox hexadecimal palettes (in my case line 235).
There are a bunch of ifs, the 2 first being if (has("gui_running") && ...)
In the terminal, it does not, so depending on if you are using 16 or 256 colors, you will be in the 3rd or 4th elseif
.
-If you really want the blue of Solarized, you can set your gnome-terminal profile to use solarized colors and change in solarized.vim
the line:
let s:base03 = "234"
into
let s:base03 = "NONE"
To use the terminal's default color (base03 is used for the background color).
Although I am not persuaded than modifying the theme like that is the best to do (I tried to set the variable at the end of my .vimrc
but it did not work).
And as I don't want to use solarized in my terminal, just in Vim, I stayed with the grey and 256 colors of solarized by default.
Most people barely know about gnome terminal color setting, they just use existing tool to do the job.
colorscheme solarized
in your .vimrc . That's all i need to get solarized colorsheme for neovim.Don't waste your time on vim setting before you setup your terminal.