B
B
BlackPie2013-02-24 10:05:27
vim
BlackPie, 2013-02-24 10:05:27

Setting the vim color scheme

github.com/daylerees/colour-schemes/blob/master/vim-themes/colors/Iceberg.vim

I stumbled upon this topic on Habré - I wanted to install it, but so far I have not succeeded.
Copy-pasted the text into a .vim file, threw it in both .vim/colors and /usr/share/vim/vim73/colors, in both cases he achieved a tab, but after applying :colorscheme iceberg, all text becomes one-color.
I tried it on a remote host from under putty and on a local machine - the result is the same.
Since there were no complaints in the post where this topic was posted, what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
moonlighter, 2013-02-24
@moonlighter

In short : you're either using a terminal that isn't color enough, or you're using a color enough terminal that vim doesn't know about.
First of all, I must say that the scheme works great in GVim, but this is not surprising, the GUI mode generally uses RGB colors. But judging by the word "putty", you are not interested.
Secondly , having tried this scheme for myself, I also found that it is gray in the console. Looking at the contents of the color scheme file, I noticed that the field is littered ctermfg=with values ​​close to 255, and I wondered, but is my terminal 256-color? In this answer, I found a wonderful phrase: GNOME Terminal supports 256 colors, but doesn't advertise its support.That is, vim does not know that the terminal supports 256 colors, it gets upset, and does not show them at all.
If your terminal does not support 256, then there is probably nothing to do here. Need a scheme that has fallback to 16 color mode. For example, I use vividchalck - I really like its contrast.
If it does, then, as advised in that answer, you can set the variable TERMto a value xterm-256colorbefore starting Vim, and you'll be fine. I.e

$ export TERM=xterm-256color
$ vim file.cpp

or
$ TERM=xterm-256color vim file.cpp

In the second case, we do not mess up the TERM variable and change it only for this Vim run. Tested on Vim 7.3, bash 4.2.37, Konsole terminal emulator (KDE 4.9.4).
The best way to find out if 256 colors are supported, that is, if this way will work, is probably to try it :)

[
[email protected]><e, 2013-02-24
@barmaley_exe

Maybe a 256-color terminal is needed? Try in .bashrc

export TERM=xterm-256color

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question