I'm somewhat new to Vim and NeoVim, so I installed the plugins and started up NeoVim and for some reason the 256 colors are not showing on NeoVim, instead I get this,
I'm using Konsole on KDE linux to run NeoVim and my NeoVim init file looks like this after loading the plugins before these lines,
syntax on
set encoding=utf8
set t_Co=256 "Explicitly tell vim that the terminal supports 256 colors"
colorscheme base16-solarized
My $TERM variable is xterm.
How can I fix this? Thanks.
Related
I've tried to install a bunch of colorscheme for vim, and they don't work on Urxvt terminal, while on Termite the only problem is that when I scroll the colors get messed up.
Color scheme problem
On the left Urxvt, on the right Termite
Echo of $TERM
URXVT: rxvt-unicode-256color
Termite: xterm-termite
That's my .vimrc file.
For some reason, it wasn't working because of theese lines:
set termguicolors
set t_Co=256
That's the .vimrc fixed.
You should probably check your **.Xresources/.Xdefaults ** the problem can be from there .
termite uses ~/.config/termite/config
and Urxvt uses .Xresources .
I'm struggling to make the Solarized colorscheme correctly working on an Ubuntu 13.10 machine inside Vim inside tmux inside the gnome-terminal.
I've started configuring gnome-terminal using the script on this repository and it displays the colors correctly. The same goes if I run Vim (with the official Solarized colorscheme) inside the terminal, without tmux.
Then I tried to configure tmux using this. It happens that when I run Vim the syntax highlight for php or javascript code is wrong or, at least, different from the one I see running Vim without tmux. I've tried also running tmux as tmux -2. The colors are different, but still the syntax highlight is not correct.
I tested it out and got it working in the following way:
Install gnome solarized colorscheme. You can get it from https://github.com/aruhier/gnome-terminal-colors-solarized.
Install solarized colorscheme for vim. You can get it from https://github.com/altercation/vim-colors-solarized. In .vimrc you should add following settings:
set t_Co=256
set background=dark
colorscheme solarized
Set correct TERM variable by adding following line to your .bashrc/.zshrc
export TERM=screen-256color-bce
Run gnome-terminal, tmux, vim and profit.
These days GNOME Terminal comes with Solarized colours built in. To use it, you need to change two settings in the profile that you're using. The obvious one is the text and background colour. You also need to set the palette to Solarized, though. You can find this setting below the one for the text and background colour. At this point, setting t_Co or g:solarized_termcolors in Vim shouldn't be necessary.
The palette is the part that I missed at first, which caused me to puzzle why the text in Vim and other applications was bright blue.
I'am using vim in Konsole and Yakuake. But I can't see the correct colorscheme.
My .vimrc file have the following text:
t_Co=256
syntax enable
set background=dark
colorscheme desert
My OS is Debian Sid.
Can you help me?
you need csapprox plugin to correctly display some color schemes in terminal
I really apologize because I know that this question has been asked multiple times. I have gone through all of the previous questions, but I still have yet to have any luck setting up the Solarized colorscheme in my Terminal.app for OS X Mountain Lion. So far this is what I have:
My .vimrc currently is set up like the following:
set number
syntax enable
set background="dark"
colorscheme solarized
but for my MacVim I get this:
This is what I would like to have my Terminal.app display as well. The only thing that my .vimrc says for MacVim is
colorscheme solarized
Edit
After I had asked this question, I eventually moved to iTerm2, which proved to be much nicer.
I'm not 100% sure, but I think the newer versions of OS X terminal will support 256 colors out of the box.
I had the same issue, then I downloaded an alternate implementation of the Solarized theme for the Mountain Lion terminal, and this appears to have solved it.
Just add let g:solarized_termcolors=256 to your vimrc
Ensure that TERM is set to xterm-256color to let Vim know that the terminal supports 256 colors. This is the default for Terminal in Lion 10.7 and later†, so your preferences were customized at some point.
To tell Terminal to set TERM to a different value, go to
Terminal > Preferences > Settings > [profile] > Advanced
and change Declare terminal as: to xterm-256color.
[Note that all this preference does is set the value of the TERM environment variable. It does not alter the behavior of Terminal or affect what sort of terminal it emulates.]
† Prior to Lion, the default was xterm-color.
Add to your ~/.vimrc
" Solarized Dark
syntax enable
set t_Co=256
let g:solarized_termcolors=256
set background=dark
colorscheme solarized
This works on both ansi and xterm-256color versions of Solarized. Tested on Terminal 2.3 on a new OS X 10.8.5 VM installation.
NB This answer supersedes the previous one that proposed changes to the profile swatches. I recently realised I had these commands in my .vimrc file that actually configured Solarized.
To run vim with 256 colors you must use a 256 color terminal. You can set your terminal to xterm-256color, for example, with export TERM=xterm-256color and then start vim. You can export this $TERM setting in one of your terminal startup scripts (e.g. .bashrc, .zshrc, etc.).
It may seem counterintuitive, but use set g:solarized_termcolors=16. This is confirmed to be the correct setting with :h solarized.
I'm on windows 7. I've installed vim73 which also comes with gvim.
I downloaded a colorscheme and set it like this in my _vimrc file which lies in the root of my c:\program files\vim
:colorscheme wombat
When I run gvim the colorscheme works but when I execute vim from DOS then I just runs the default colorscheme. When in vim off of DOS if I type :colorscheme wombat nothing happens.
One last thing when I open gvim how can I make it open fullscreen.
Thanks
To answer your second question and if you're on windows you can use:
autocmd GUIEnter * :simalt ~x
in your _vimrc to start gvim in fullscreen.
I can only guess why your colorscheme does not work inside your windows terminal, but maybe the terminal does not support the color range used by the scheme and it defaults to standard colors.
Maybe this documentation can help you.