tags:

views:

120

answers:

2

When I run vim from the commandline in iterm, syntax highlighting doesn't seem to work locally.

In vim for example I have installed a nice colour scheme 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

A: 

In order to turn code highlighting on in vim, try to enable the syntax plugin:

:syntax enable
Sean
On a side note, many of the schemes are made for GVim / MacVim and don't necessarily display to their entirety inside the terminal.
Sean
+2  A: 

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
Curt Nelson
I would presume that there must be some setting in iTerm, to allow 256 colours?
Derek Organ
nice one that worked perfectly
Derek Organ