Making a custom Vim Syntax file

I use Vim everyday. I'm not a master at it, but I can use it productively everyday.

Besides being a very productive and lightweight editor, one thing I like about Vim is its outstanding syntax highlighting capabilities: if you program in any language, you can be 99% sure there's a Vim syntax file to highlight it. If not, then nothing stops you from creating your own of course.

I created a Vim color scheme in the past, and it was easy enough.

Creating a vim syntax scheme, however, is a whole different game. It's not impossible and there's plenty of documentation for it, it's just a matter of understanding how it works. Anyhow, I managed to create a very simple (but working!) syntax file for my very own Glyph Macro Language:

The language itself has a very simple grammar, nevertheless I was quite pleased of the result (see the gallery of images below).

The syntax file is now versioned in my stash, but you can also get it from vim.org.

(download)

SQLite-powered NoSQL Key/Value Store?

For a while I've been keeping an eye on the whole NoSQL movement. Not because I need a highly-scalable storage solution, but rather because I'm interested in storing arbitrary documents in a database and being able to retrieve them easily enough.

I really enjoyed this article on igvita.com: I didn't know about the possibility of having schema-free tables in MySQL, and while I was delighted of the discovery, I wasn't too pleased by the fact that SQLite doesn't support anything like that...

Why SQLite? Well, because I like embeddable, standalone and cross-platform databases, that's all.

Read the rest of this post »