My first VIM script

I’ve switched over to vim for quite a while now (over a year now, I think), after being a die-hard gedit user. My productivity has gone way up since, but there’s always been something that’s bugged me: When you press , it always goes to the start of the line. Really, I want it to go to the first non-whitespace character, and if it’s already there, go to the start of the line (same behaviour as most modern graphical editors). After an unsuccessful twitter appeal, I decided to write my first ever VIM script to do this:

Putting that script in your ~/.vim/plugin directory, and then mapping it with

gives me my desired behaviour 🙂 It’s a pretty naive script, but it does the job.


30 Years of Pac-Man

Today (well, tomorrow my time, today in Japan) is Pac-Man’s 30th anniversary. Google have celebrated by putting a Google-themed Pac-Man game on their home-page, and in this spirit (and after the encouragement of my colleagues), I’m writing a small blog post on one of my pet projects:

Note, this is a completely original game, influenced by the classic Pac-Man (but not copying it. Seriously). This is not Pac-Man. Hopefully this will demonstrate some of the capabilities of Clutter and Mx. I plan on finishing and demoing this, and perhaps other games, as part of the talk that Damien, Neil and I will be doing at Guadec. Please leave any other quick game-ideas you’d like to see in the comments!

Pac-Man is one of my favourite games, mostly because of the amazing concept and gameplay when you consider the time it was released and other games of the time. I like to think of Pac-Man being the earliest example of emergent behaviour giving the illusion of complex AI in a computer game. There’s an excellent ‘summary’ of Pac-Man behaviour here. It’s hard to believe when playing it that it’s completely deterministic!

Here’s to another 30 years of awesome video-games!