Vim colors in HP-UX

I am using xterm on my HP-UX system (11i). Color is working in xtrem, i can see that with the -color option on ls. When I use vim's syntax high lighting, instead of colors, it uses underline and bold (which looks horrible). I added the following

if &term =~ "xterm"
       if has("terminfo")
               set t_Co=8
               set t_Sf=<Esc>[3%p1%dm
               set t_Sb=,Esc>[4%p1%dm
       else
               set t_Co=8
               set t_Sf=<Esc>[3%dm
               set t_Sb=<Esc>[4%dm
       endif
endif

to my .vimrc file, which caused the [3%dm and whatnot to show up all over the file, still no color.

Any suggestions?

Somewhat late perhaps :slight_smile:
But this post came quite high in my google search for "vim colour hpux". And I've located a solution to this problem. Tip #222 - Building vim with color on HP-UX : vim online

Compile vim with ./configure --with-tlib=curses
and you're rolling with colours.

Here's the updated link:

Building vim with color on HP-UX - Vim Tips Wiki