enabling syntax highlighting for vim?

Rainer Müller raimue at macports.org
Thu May 22 18:10:42 PDT 2008


Cameron Simpson wrote:
> A bit like Max, I would like syntax highlighting for vim.
> 
> I know vim itself is colour capable because the "~" blank line markers and
> warning messages are in different colours. However, my source code is in
> boring monochrome. There do not seem to be variants to enable syntax
> highighting, nor separate packages (or at least, my searches do not reveal
> them to me). I've even build vim with the +huge variant to no avail.

There is no variant for it, because basically every vim installation has 
the ability to do colored syntax highlighting. You just need to 
configure vim to do it. Also, a google search for "vim syntax 
highlighting" revealed a lot of useful answers for me...

Anyway, you need the following line in your .vimrc:
   syntax on

See also :help colorscheme how to use other colors instead of the default.

Rainer


More information about the macports-users mailing list