Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iterm vim colorscheme not working

Tags:

vim

macos

iterm

When I run vim from the command line in iTerm, syntax highlighting doesn't seem to work locally.

In vim for example I have installed a nice colorscheme that works quite well in MacVim but it would be great if in iTerm it showed the same one.

Any ideas how I can turn this on?

This is the color scheme I'm trying to use http://www.vim.org/scripts/script.php?script_id=2340

like image 669
Derek Organ Avatar asked Sep 21 '10 15:09

Derek Organ


People also ask

How do I add Colorscheme to Vim?

You can change color schemes at anytime in vi by typing colorscheme followed by a space and the name of the color scheme. For more color schemes, you can browse this library on the vim website. You can enable or disable colors by simply typing "syntax on" or "syntax off" in vi.

Where does Vim install Colorscheme?

To install a new color scheme for Vim, you will need to download it from the git hub repository. Here I am going to download a vim theme “Monokai” from the Git repository. For Monokai color scheme, open the following link, then right-click and save it as . vim in your Downloads directory.

Does iTerm2 support true color?

Terminal: iTerm2 and kitty, which support True color by default.

What is Vim default Colorscheme?

The default Vim color scheme in a light terminal is peachpuff . If you use a dark terminal, the initial color scheme is ron .


1 Answers

That color scheme looks like it only supports 256-color terminals. If Vim thinks that your terminal only supports 8 colors, you won't see that specific color scheme.

You can check this in Vim by:

:echo &t_Co 

If that returns 8, this might be the problem. Try setting it to 256 in your ~/.vimrc and see if that helps:

let &t_Co=256 
like image 154
Curt Nelson Avatar answered Sep 21 '22 13:09

Curt Nelson