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
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.
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.
Terminal: iTerm2 and kitty, which support True color by default.
The default Vim color scheme in a light terminal is peachpuff . If you use a dark terminal, the initial color scheme is ron .
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
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