Gregory Margo wrote:

On Tue, May 30, 2006 at 02:44:17PM -0400, Chisum Lindauer wrote:
Hello all I've just worked on trying to get this to work a few hours with no luck, so I thought I'd consult the community.

In short, my syntax highlighting doesn't work. Not in vim or vim -g/gvim. I've tried the easy things like :snytax enable or :syntax on and manually loading a colorscheme but to no effect.
I recently did an apt-get upgrade which broke my X install.
Once I had fixed that and returned to the world of GUI's I found my syntax highlighting didn't work. The color test shows all the colors properly however. (Select it from the syntax menu in gvim). At first I thought it might be because of my terminal, but changing that using tset and/or setting my TERM environment variable to xterm-color helped not in the least. It's not just a color problem anyhow, as bold and italics don't work on syntax either. It's not a colorscheme bug either, as I've tried using several colorschemes and get the same results (though it will change the bgcolor an fgcolor in gvim).

I tried removing and reinstalling gvim as well, but the problem persists. Needless to say, now that I'm used to syntax highlighting being without it feels like losing an arm.

The only error message I've ever seen regarding the syntax is when I opened up gvim and select on/off for This file under the syntax menu, it tells me that my colorscheme can not be found when parsing syntax/synload.vim. This error doesn't happen except when I first load vim, and only if I don't change the colorscheme before hand. This might be a clue for someone, but probably not.

Also if I log into our server ssh -X and use gvim over the network, syntax highlighting does work, of course, that doesn't say a damn thing either. It just makes me think that it's probably a configuration file of some sort...

I hope someone has an idea, I sure as hell don't.
Thanks,
Chisum Lindauer

If you have both vim-6 and vim-7 installed, there may be a conflict,
especially if you try to share a ~/.vim directory.  I'm running under
Debian Stable, and have the default vim-6.3.82 installed, and have a
locally compiled vim-7.0.15 installed also (with binary name 'vim7').
Syntax highlighting works find under either.  However,
I've kept them seperated with different .vimrc files, and different
'runtimepath' variables.

Try this: in an xterm (version 4.3.0.dfsg.1-14sarge1) run
"/path/to/your/vim7 -u NONE".

Now type ":help" - you should see black-n-white help text.
Now type ":syntax on" - you should see the help with syntax highlighting.

If does not work, it could be the color settings of the xterm itself.

Since you mentioned breaking your X setup, could it be that you're
running a bleeding edge Debian Unstable (etch) system?

"<Debian Vim maintainer hat>
Please report problems you experience with Debian's vim packages to
Debian (reportbug is your friendly bug reporting program).  At the very
least, peruse the bug list to see if someone has reported a similar
problem.
</Debian Vim maintainer hat>"

Indeed :)  Once I identify the problem I'll be sure to report it :)

"Try purging[0] vim-common..."
Thanks for the information on purging, I had only removed everything.  However, 
after purging and reinstalling I had no luck reinstalling from apt-get after a 
purge.  Next I'm going to purge and try reinstalling from source. :)


""/path/to/your/vim7 -u NONE".

Now type ":help" - you should see black-n-white help text.
Now type ":syntax on" - you should see the help with syntax highlighting."

It worked!  The help syntax highlighting came on.  I checked my dpkg --list | 
grep vim and I only have version 7 installed.  I'm not sure how to check if I'm 
on etch or not... (I'm actually sort of a Debian newbie).  But my etc/issue 
file says:
Debian GNU/Linux testing/unstable \n \l
and uname -a says:
Linux chewbaca 2.4.26-1-386 #1 Tue Aug 24 13:31:19 JST 2004 i686 GNU/Linux

(yes.. still on the 2.4 kernel...)

But now, how do I make this syntax highlighting work on a regular file and why 
is it not working on regular files if it works with :help?

I'm open to suggestions :)  In the mean time I'm going to try reinstalling from 
source and purging my current install.

Thanks to all who replied!
Chisum Lindauer

Reply via email to