Friday, January 30th, 2009

Becoming More Productive With JavaScript and Vim Screencast

Category: Dojo, Tutorial

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

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.

How do you extend your tools to give you a hammer that is suited to your work?

Posted by Dion Almaer at 6:29 am

3.3 rating from 23 votes


Comments feed TrackBack URI

Wow. Hardcore. As much as I like Vim (since Bram released the first version for the Amiga in 91), I really wouldn’t give up the amazing syntax checking in some of the new editors like Komodo and Aptana. They do a lot of jslint-like checks as you’re typing. Really saves me time. I’m even setting breakpoints and variable watches in Aptana now for a JS AIR app. As good as anything I ever had in C!
Good for you, though, bringing Vim along kicking and screaming. Whatever works for you. (The Amiga had lots of great text editors. Remember CygusEd and TurboEdit?)

Comment by Nosredna — January 30, 2009

same for me (almost). I won’t go away from netbeans php anymore.
but too bad for the video, I can’t read quicktime movies (no, I won’t install the dirty quicktime player).

Comment by gokudomatic — January 30, 2009

Yeah, Netbeans has great JavaScript support.
Last time I tried the PHP version since an early beta that sucked down RAM like Takeru Kobayashi sucks down hot dogs. I haven’t had a chance to try it again lately, but it was neat.

Comment by Nosredna — January 30, 2009

Leave a comment

You must be logged in to post a comment.