I'm having difficulty getting my colorscheme to change. I've opened both ~/.vimrc and /usr/share/vim/vimrc and added:
colorscheme desert
...and nothing. I noticed the color schemes are here:
/usr/share/vim/vim72/colors/desert.vim (...along with a bunch or others)
which seems like the wrong place so I:
cp /usr/share/vim/vim72/colors/desert.vim ~/.vim/colors/
and still no go.
Try setting your terminal colours in your .bashrc/.bash_profile to:
export TERM=xterm-256color
& in your .vimrc
let g:"your_colourscheme"_termcolors=256
& that should stick. Bit of a kludge I know but it should work.
Saves typing
:colorscheme whatever everytime you start Vim
Custom colorschemes should go in ~/.vim/colors/, and adding the colorscheme line in your ~/.vimrc should work. So it sounds like you're doing that right.
Double-check that you don't have some other colorscheme line lower down in your vimrc or in an included config file that might be overriding it.
Also double-check that your .vimrc is being loaded as expected. One easy way to tell is by trying to load a nonexistant colorscheme name - if the line is being parsed, then you should get an error like:
E185: Cannot find color scheme foobarbaz
If your colorscheme line is being correctly parsed, you need to check if your terminal is correctly configured to display the colors.
The situation with terminals is a mess when it comes to colors and fonts. It is quite probable that your terminal emulator (gnome-terminal? kterm?) and vim aren't using the same encodings for colors, or one is partially overriding the settings of the other. When it comes to the eternal war between console apps and modern colors and font rendering, your three options are:
Side with the old school, switch to xterm or rxvt, where the colors are more likely to just work, but got help you if you want antialiased fonts.
Side with the new school, sidestep the console entirely and use gvim, where fonts and colors will likely both just work.
Get caught in the middle and forever fight with getting fonts and colors to work properly for old console programs running in new terminal emulators, i.e. gnome-terminal, kterm, etc...
apt-get install vim or yum install vim <-- need full vim vs mini vim
ls /usr/share/vim/vim ##/colors <-- ## 72 or 73, etc list color schemes
cd ~
vi .vimrc
# Add the following two lines if the don't exist
syntax on
colorscheme elflord
# replace elfloard with what ever color scheme you like
If you are using vim-tiny in Ubuntu (the default one). Try to install vim-nox, vim-gtk or vim-gnome.
make sure that you are enabling syntax with :syntax enable.
Currently, using Ubuntu and VIM 8, I did this:
Browse to your user directory:
cd ~
Create and open a .vimrc file:
vim .vimrc
Click i for insert mode.
Type the following command below to enable syntax and give a specific colorscheme. This example uses the desert colorscheme:
syntax on
colorscheme desert
Hold Shift and hit : then type wq! to save and quit the file.
You should now be able to use vi and the colorscheme you choose to edit files on your Grid.
Below the default set of colour schemes for Vim 8:
blue
darkblue
delek
desert
elflord
evening
industry
koehler
morning
murphy
pablo
peachpuff
ron
shine
slate
torte
zellner
Related
I am using genome terminal in Ubuntu 16.04 (just in case!)
I set my colorscheme to atomdark and I have atomdark.vim in both my ~/.vim/colors and /usr/share/vim/vim74/colors.
I set this in my .vimrc file
set t_Co=256
syntax enable
colorscheme atomdark
but when ever I start vim its o a different colorscheme and if I save the vimrc file by :w the atom dark color scheme will be set but every time I start vim I should do the saving .
If I don't, it will be on the default colorscheme every vim start.
Note:
Tried the scriptnames and tracked down some paths but I could not understand a word of it. If it is the case I need specific help for it.
You seem completely lost.
/usr/share/vim/ is off-limits for you. Whatever you do to customize Vim, do it in ~/.vim/.
The correct option is t_Co, not t_CO.
265 is not a correct value. 1, 8, 16, 88, 256 are correct values.
That option is useless anyway. You should set up your terminal emulator correctly instead.
I want to change my colorscheme to this: earthsong on http://daylerees.github.io/
but it changes color something srange. like this (up: molokai, down: earthsong)
I try :colorscheme earthsong in vim, it gives same result.
I using vim on mac (latest version)
I got .vim code from https://github.com/daylerees/colour-schemes/blob/master/vim/colors/earthsong.vim
Can I get some help?
The very first place to look for help with an open source project is its issue tracker if it exists.
That colorscheme only uses your terminal palette. This means that you must adjust it to the colors used in the colorscheme which don't seem to be listed anywhere else than in the colorscheme itself.
If you use Vim 8 and an up-to-date iTerm you could tell Vim to use your GUI colors in the terminal with:
set termguicolors
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'm trying to use the light solarized theme with vim and xfce4-terminal.
I installed the theme for xfce4-terminal:
cd
mkdir solarized ; cd solarized
git clone https://github.com/sgerrand/xfce4-terminal-colors-solarized.git
cp xfce4-terminal-colors-solarized/light/terminalrc ~/.config/xfce4/terminal/
Apparently it works fine. However, when I use vim, the colors are different from the expected:
Gvim presents the correct colors. Konsole (with the proper theme, from the same git repository) shows the correct colors too.
The dark theme is presented correctly if change the vim and the xfce4-terminal theme.
I tried to change TERM and t_Co, but it didn't work.
I tried to follow this answer but it remains with the incorrect colors.
The link above says that the xfce4-terminal devs have changed the syntax of terminalrc.
When I compare xfce4-terminal and konsole pallets, I see that the there are some colors different, so I think terminal isn't reading rightly the terminalrc archive. Since the terminalrc archive from git is 2 years old, it makes sense. However, I don't know how to modify to the correct colors since I don't know the correspondence between the pallets of Konsoleand Xfce.
Does anyone have a suitable archive? Does anyone want to create one and make it available via git, updating the config for other people? (presuming that it's in fact a problem with the recent syntax.)
oK got it work!
You cannot use the colors which are on git hub xfce4-terminal
For the dark you can use the one which comes with xfce-terminal (Edit->Properties->Color->Presets * Solarized (dark/light)
Important is that you go afterwards to ~/.config/xfce4/terminal/terminalrc and remove
ColorCursor=
Than edit the .vimrc with
syntax enable
set background=dark
colorscheme solarized
set t_Co=16
set background=dark works for me with light and dark terminal setting.
I have exactly the same problem.
I get the best results with this.
It is not 100% the same but looks best to me
let g:solarized_termcolors=256
syntax enable
set background=light
colorscheme solarized
set t_Co=256
Hope that helps
I downloaded the Dark.vim color scheme from here:
http://vimcolorschemetest.googlecode.com/svn/html/index-c.html (Click on Dark.vim to see the code)
Then put it in ~/.vim/colors.
I also did the same for 256-jungle.vim and af.vim.
:colorscheme Dark, :colorscheme af, etc. all work (i.e. they change vim's syntax highlighting) but none of them look like the screenshots in the link above.
Instead, they look like this (ordered af.vim, 256-jungle.vim, Dark.vim): http://imgur.com/a/NsmHy
At first I thought this might be a problem with the color-settings in my terminal, so I followed tips from a "256 colors in vim" Vim wiki-doc page, which told me to add the following to my ~/.bash_profile :
TERM=xterm-256color
# for enabling 256 color, as per http://vim.wikia.com/wiki/256_colors_in_vim
if [ -e /usr/share/terminfo/x/xterm-256color ]; then
export TERM='xterm-256color'
else
export TERM='xterm-color'
fi
This didn't work.
Also, here's what's in my ~/.vimrc file:
set tabstop=2
set t_Co=256
colorscheme 256-jungle
colorscheme Dark
syntax on
let $VIM='~/.vim/'
Any thoughts on what's causing this disparity between what the colorschemes "should" look like and what's actually being displayed in my terminal? I'm running Mac OS X 10.8.2.
Thanks in advance for any help.
The Dark colorscheme you tried to use in terminal is actually a scheme for GUI (if you take a look at it's code, you'll see only 'guifg, guibg' etc. definitions). To run gui colorschemes in a terminal you can try CSApprox plugin.