Posts Tagged ‘ctags’

January 28th, 2009 9 Comments »
Tags: , ,

Category: Screencasts

Becoming More Productive With Dojo and Vim Screencast

Update: I’ve uploaded an mpeg-4 (~63MB) video of the screencast that you can access here if for some reason QuickTime’s H.264 format isn’t an option for you. I’m still a bit new at encoding video, so I’ll try to get the filesize down for next time.

I’ve been doing some reflecting this week on how I can work smarter (instead of harder), and one of the things I came up with was adding a few more tools to my Vim repertoire. I spend more than half of my engineering time in Vim (the other half usually being in a web browser), so I figured that a few minutes here and there would eventually add up in a big way.

In hopes of inspiring you to do the same, I put together a short screencast (~4mins; 14.5MB QuickTime file) that talks you through how to generate a custom tags file for Dojo’s API and the keystrokes to put it to work. Although I’m specifically using Dojo, I think this technique should probably apply to a lot of other toolkits as well assuming that they define API call in a consistent manner that can be approximated by a regex.

But like anything else with Vim, there are always multiple ways of accomplishing the very same thing, so I make no guarantees that there aren’t simpler ways of getting this done — but I can say that this way gets the job done, and is pretty easy to get working on your own system.

By the way, here are links to the script and the tags file (for Core) mentioned in the screencast. I’ve slightly tweaked the tags file to remove duplicate tag names and a few things that weren’t really parts of the public API (regexes are obviously imperfect heuristics). I can’t say that the tags file may not be missing a few API calls, but tags are easy enough to add in manually if you do notice any omissions.

As time allows, I’ll try to get the Dijit API and DojoX API churned out and post back here with a consolidated tags file for the entire toolkit — that is, unless someone beats me to it, in which case I’d be happy to host or link back to the tags file you come up with if you send it over.