I am struggling on the installation of solarized plugin on vim, the following are the steps I followed
syntax enable
set background=dark
colorscheme solarized
.vimrc script used
But outcome the solarized plugin comes with following results which look and feel are not as expected
Expecting look
Is there anything I have done wrong? Please advice. Thanks and appreciate everyone for the kind help
Try to add
set t_Co=256
let g:solarized_termcolors=256
Looks better, but still different from the capture shown by the author
I had the same problem once. I guess the easiest way to do this is using pathogen. To install pathogen, from console:
mkdir -p ~/.vim/autoload ~/.vim/bundle; \
curl -LSso ~/.vim/autoload/pathogen.vim \
https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim
Then add this to your .vimrc:
execute pathogen#infect()
Now you can install plugins into ~/.vim/bundle which will be automatically loaded to vim. To install solarized theme, simply add vim-colors-solarized plugin:
cd ~/.vim/bundle
git clone git://github.com/altercation/vim-colors-solarized.git
The rest you have, which is setting t_Co to 256 and setting colorscheme to solarized. You may also try:
set t_Co = 256
Finally changing terminal emulator's color scheme to solarized might help. Or if you don't want to do this, add this line in .vimrc before setting your colorscheme to solarized:
let g:solarized_termcolors=256
I hope it helps :)
I used vim-plug to add solarize. In .vimrc I added...
if empty(glob('~/.vim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif call
plug#begin('~/.vim/plugged')
Plug 'altercation/vim-colors-solarized'
call plug#end()
set background=dark
colorscheme solarized
Then after saving and closing, I run this to install
vim +'PlugInstall --sync' +qa
I had the same problem. I never managed to get vim-colors-solarized working but instead the solarized8 plugin worked perfectly for me. I guess the question is no longer relevant after 6 years, but here's my solarized setup.
I have iTerm2 with its solarized dark color theme. My term is set to xterm-256color, I have vim-plug on top of neovim, my init.vim plugin for solarized8 looks like:
Plug 'lifepillar/vim-solarized8'
Then I have these lines that set up proper colors:
set termguicolors
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set background=dark
colorscheme solarized8
syntax enable
I also have the vim-sensible plugin but I'm not entirely sure if that has any effect for this.
Good luck to anyone who's also trying to get solarized dark working in vim.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With