> As the title says, has anyone had any luck getting syntax highlighting
> to work with the terminal that comes with Mac OS X. I have compiled the
> latest version of Vim and copied my vimrc file but no joy. I have had no
> problem with other unices before (Solaris, Irix, Linux). I know the
> terminal is colour because I have "ls" in colour.
>
> Any ideas out there?
>
> Thanks Matt
I've had this piece of code in my .vimrc on various machines for years.
I've never actually tried to figure out what it does, but it seems to
make the difference as to whether I color hilighting works.
--------------------
:if has("terminfo")
: set t_Co=16
: set t_AB=^[[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm
: set t_AF=^[[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm
:else
: set t_Co=16
: set t_Sf=^[[3%dm
: set t_Sb=^[[4%dm
:endif
syntax on
--------------------
The four "^[" symbols are literal escape characters in the file. Type
control-V ESC to insert them.
I'm hapily using this on OS X now, though I had to invert the terminal
colors so it's white on black. Otherwise I can't read vim's cyan and
yellow which it likes to use all over the place.
Does anybody know how to change the "ANSI" colors so that what Terminal
thinks is Cyan is still readable on white?
Hope this helps,
-David Mankin
Email: my last name (see above) <at> yahoo.com