Vala and Vim

I'm a Gnome user and like reading Planet Gnome (In Google Reader of course!) to see what is going on. There's been quite some buzz around Vala lately so of course I had to check it out. Having used Java and C# quite a lot I've learned to like the syntax. Vala is still in early development, but it's improving quickly and already works well enough to play with.

To make the code look better in vim, add this to your vimrc file. I'm using Gentoo so I put it in /etc/vim/vimrc.local (Ignore the numbers, they are needed because Blogger sucks when you try to show code.)
  1. augroup vala
  2. au!
  3. au! BufRead,BufNewFile *.vala set filetype=vala
  4. au! Syntax vala source /usr/share/vim/vim71/syntax/cs.vim
  5. augroup END
Vala's syntax is similar enough to C# for this to look quite ok.

1 comment:

Garoth said...

Thanks, buddy! (same story as you, p.g.o, wanted vala, like vim)