enabling syntax highlighting for vim?

Cameron Simpson cs at zip.com.au
Thu May 22 18:53:43 PDT 2008


On 23May2008 03:10, Rainer M?ller <raimue at macports.org> wrote:
> 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 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. [...]
> Anyway, you need the following line in your .vimrc:
>   syntax on

I am revealed as a fool. I had believed that because my personal .vimrc was
identical on my Mac and on my home machine the deficiency was in vim (I was
guessing missing syntax files or missing functionality).

But adding the above line to my vimrc turns on syntax colouring and shows
I was unwittingly relying on a default setting on other installations
(gentoo and fedora linux mostly).

Thanks.

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

Ta. I did play with this in the distant past (mostly to try to eliminate
the dark blue, close to unreadable on my terminals, which have a black
background). I'll revisit this stuff soon.

Thanks again,
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

The best way to rob a bank is to own one.       - Roberto Calvi


More information about the macports-users mailing list