PDA

View Full Version : How do I set up GTK syntax highlight in vim?



mmfmarin
July 12th, 2009, 04:20 AM
I'm following this (http://zetcode.com/tutorials/gtktutorial/) tutorial about GTK+. I want to edit the .c files in vim but I don't know how to enable the syntax highlighting for GTK+.

Here is what I've done until now:


sudo apt-get install vim vim-syntax-gtk vim-addon-manager exuberant-ctags

when I ran the command:


vim-addons


I got:



editexisting removed removed
gtk-syntax removed removed
justify removed removed
latex-suite removed removed
matchit removed removed


After I ran: vim-addons install gtk-syntax, the output changed to:



editexisting removed removed
gtk-syntax installed removed
justify removed removed
latex-suite removed removed
matchit removed removed


Does anyone know what am I missing?

hugmenot
July 13th, 2009, 01:38 AM
What is missing for you? Do you see color at all? I not, try :syntax on

mmfmarin
July 13th, 2009, 05:00 AM
What is missing for you? Do you see color at all? I not, try :syntax on

I do see colors, but just for C reserved words. The GTK+ words are still the same (no colors for them at all), even after I did what you suggested. Actually, the regular syntax highlighting has been always working for me.

Thanks for your reply.

hugmenot
July 13th, 2009, 10:44 AM
Ok. Read /usr/share/doc/vim-syntax-gtk/README.Debian

mmfmarin
July 13th, 2009, 08:41 PM
Thanks, it's working now.

After I read the file you indicated. Here is what I did:


cp /usr/share/doc/vim-syntax-gtk/examples/c.vim /home/user/.vim/syntax/c.vim

Thanks again. SOLVED

JordyD
July 14th, 2009, 12:46 AM
Thanks, it's working now.

After I read the file you indicated. Here is what I did:


cp /usr/share/doc/vim-syntax-gtk/examples/c.vim /home/user/.vim/syntax/c.vim

Thanks again. SOLVED

You should edit your OP's title so that it says [SOLVED] at the beginning.