LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   vim syntax highlighting problems. (https://www.linuxquestions.org/questions/linux-software-2/vim-syntax-highlighting-problems-267479/)

donniejones18 12-17-2004 02:34 PM

vim syntax highlighting problems.
 
Hello,

I am trying to get vim syntax highlighting to work, but I am having some problems...
I first tried putting "syntax on" in my ~/.vimrc file, and then opening a .c source code
file to see the syntax highlighting, but there is no color. I have mutt and other things loading in my xterm that are in color, so it seems that my xterm supports color just fine.

I then tried typing ":syntax on" in vim, and I received this error:
Error detected while processing /usr/share/vim/vim63/syntax/syntax.vim:
line 42:
E216: No such group or event: filetypedetect BufRead

I was not able to find any results for this error on google...
I am using debian "testing" branch and vim version 6.3.13
dpkg -l | grep vim
ii vim 6.3-013+2 Vi IMproved - enhanced vi editor
ii vim-common 6.3-013+2 Vi IMproved - Common files

Any help would be great...
Thank you.
__
Donnie

mhiggins 12-17-2004 04:06 PM

make sure you have

/usr/share/vim/vim63/syntax
and that there is a c.vim file in that dir

donniejones18 12-17-2004 08:20 PM

Yes, I have the file /usr/share/vim/vim63/syntax/c.vim

atrixnet 01-17-2006 09:15 AM

Fix: re-install

The jist of it is to re-install vim. I saw this mentioned in an obscure IRC log archive and subsequently tried it myself. I can confirm that the re-install solution worked for me.

How to fix the problem on Debian:

sudo apt-get update ; sudo apt-get remove --purge vim vim-common vim-full vim-scripts ; sudo apt-get clean ; sudo apt-get install vim vim-common vim-full vim-scripts

If you aren't using Debian:

You should be. Ha ha.

--
Tommy Butler
Dot Simple, LLC

donniejones18 01-17-2006 09:18 AM

Thanks for the reply.

I believe this problem was later fixed by an "apt-get upgrade" that replaced the old files...

atrixnet 01-18-2006 12:19 PM

Quote:

Originally Posted by donniejones18
Thanks for the reply.

I believe this problem was later fixed by an "apt-get upgrade" that replaced the old files...

nope. not yet.

atrixnet 01-18-2006 12:22 PM

oh and by the way...

the fix won't work if you have KDE installed on your machine unless you uninstall KDE as well. I'm working on a fix for that myself, and I may write a patch if there's any interest.

--
Tommy Butler
Dot Simple, LLC
www dot dotsimple dotcom

moon.id 04-16-2006 08:03 PM

Another Fix:

Edit the "runtimepath" variable in '/etc/vim/vimrc' to include '/usr/share/vim/vim63' or '.../vim64' according the the version installed by you.

Ref:
lists.alioth.debian.org/pipermail/pkg-vim-maintainers/2005-October/001327.html
Enjoy :)

- Mohan


All times are GMT -5. The time now is 11:09 AM.