Loading ...
Sorry, an error occurred while loading the content.

syntaxhighlighting by parsing header-files?

Expand Messages
  • Bart Kuik
    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
    Message 1 of 1 , Apr 2, 2001
    • 0 Attachment
      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
      syntax-highlighting.

      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
      syntax-highlighting......

      Bart

      Ow yeah, and an example of how gtk+ apps look in my gvim is here:
      http://www.rendo.dekooi.nl/~kuik/vim/rangewidgets.c.html
      (it's one of the example-sources in the gtk+ tutorial)
    Your message has been successfully submitted and would be delivered to recipients shortly.