January 28th, 2009
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 generateTags.sh 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.

Tags: , ,

9 Responses to “Becoming More Productive With Dojo and Vim Screencast”

  1. Ajaxian » Becoming More Productive With JavaScript and Vim Screencast Says:

    [...] Matthew Russell has created a nice screencast showing how to be more productive in Vim: [...]

  2. Richard Harding Says:

    Not to bash, would love to watch this. After all, I’m a vim loving user on Linux. Putting out the screencast in Quicktime though? Seems a little backwards for the topic.

  3. Kent Says:

    Nice screencast, but give your eyes a favor and start using iTerm that supports 256 colors instead of awful Terminal.app, not to mention that you can enable mouse support in iTerm with ‘set mouse=a’

  4. Diogo Shaw Says:

    Really useful screencast!
    Hope to see more posts or screencasts…

  5. Me Again Says:

    What is ^X mapped to? Because as far as I know, ^X normally decrements the number under the cursor.

  6. Matthew Russell Says:

    @Richard – Argh. You are right. I’m sorry. I use the Mac for about everything these days, so it didn’t occur to me. I’m working on getting a quality video exported in a more Linux friendly format and will update shortly.

    @Kent – Good idea. I had used iTerm a while back and struggled with what seemed to be performance problems with it. I’ll try it again though. I haven’t quite mastered the art of screencasting yet, and I agree that a better terminal would probably help my eyes as well as make the quality of the video better.

    @Me Again – It seems that when you do ctrl-x over a number, it does decrement it, but if you do that keystroke over a non-numeric symbol, vim enters what I’ve always heard as “control x” mode, which then gives you the option to pass in another keystroke.

  7. Me Again Says:

    Oh, I figured it out… It was Ctrl+X in *insert mode*. Silly me…

  8. Matthew Russell Says:

    @Richard – Posted the update yesterday with an mpeg-4 file, which hopefully is more friendly and cross-platform. Sorry if the file size is a little large. I’m still in the process of learning the balancing act between video quality vs file size. If you have expertise in this area, I’d gladly try any suggestions for next time.

  9. Becoming More Productive With JavaScript and Vim Screencast | Guilda Blog Says:

    [...] Matthew Russell has created a nice screencast showing how to be more productive in Vim: [...]