Re: syntaxhighlighting by parsing header-files?
- On 02 Apr 2001 14:13:49 +0000 Bart Kuik <kuik@...> wrote:
> better made a script for it, or maybe an automated script that sees theThis is going to be very difficult to do, I'm afraid. OTOH, what about using
> line "#include <gtk/gtk.h>", executes "gtk-config --libs --cflags" to
> see where the headers are, and automatically parses them for
tags file for syntax highlighting? Like this you leave ctags to do the
difficult part of the work (parsing C - which it does amazingly well, BTW) and
you should be able easily to create syntax groups for various tags (i.e.
functions, structs/classes, ...) from the tags file.
I didn't do it myself though (but I'd like to have something like this ;-).
- Hi all,
A couple of days ago I started programming in GTK+, just to get some
experience with working with an API, and to fix bugs / create apps just
for fun and to contribute to the Gnome / opensource community. But as
far as I know, Vim does not have native syntax-hilighting for Gtk+, and
I couldn't find any vim-scripts that did the job. So I started to make a
messy vim-script that supported all the keywords I already used (I am
already in chapter 8 of the tutorial on gtk.org), and I made a script
for the gtkenums.h header. Most of the work for that was just
straight-forward copy/paste that was so simple and boring that I'd
better made a script for it, or maybe an automated script that sees the
line "#include <gtk/gtk.h>", executes "gtk-config --libs --cflags" to
see where the headers are, and automatically parses them for
Does anyone know if something like this already exists, or how difficult
it is to write a script for it? I haven't got much experience with
string-parsing and Vim's own scripting-language since I'm only a
beginner and gtk+ is my first attempt to do something with my
basic-knowledge of C. But especially if there's one good script for it
(or maybe built-in in a next version of Vim) it just needs a few extra
lines for each library in the c.vim syntax-script to give full
Ow yeah, and an example of how gtk+ apps look in my gvim is here:
(it's one of the example-sources in the gtk+ tutorial)