Using TextMate Snippets for fast reporting from Volleyball World Championships

If you were following my Twitter stream recently, you may have seen some messages I sent out as I was covering some volleyball matches here in Tokyo. Reporting on International volleyball presented a couple of problems right off the bat for me:

  1. I needed to develop a type of shorthand for jotting down play-by-play
  2. Many of the player names were nearly impossible (see Poland's Malgorzata Glinka-Mogentale for starters)

TextMate's Snippets would prove a good solution to both of these issues, as I eventually came up with some text substitutions that served me well during the tournament. For those not familiar with TextMate snippets, it allows you to substitute a long string of text with a short one, followed by a [TAB] trigger. (i.e. The text string 'Saori Kimura' could be replaced by 'j12', as she's player number 12 on the Japan team). Here's a quick demo of me actually using the bundle, just so you can get an idea of how the work flow goes:

And for those who are interested, here's a quick explanation of my chosen shortcuts. I'll pass on a quick tip of the hat to Fred Varcoe, an experienced sports writer here in Tokyo whose own shorthand reminded me of chess notation (e.g. Q-e8!!) that would make superlatives easy, as you can see from the following. I decided that pressing a key twice or three times was easier than using a (!).

Volleyball action shortcuts:

  • s = spikes
  • ss = with a great spike 
  • sss = with an incredible spike 
  • d = digs
  • dd = with a great dig
  • ddd = with a miraculous dig
  • a = serves
  • aa = with a great serve
  • aaa = with an ace
  • t = with a tip at the net
  • tt = with a great tip at the net
  • ttt = with a brilliant tip at the net
  • b = with a block
  • bb = with a great block
  • bbb = with an incredible block 

Note: I know 'serve' doesn't start with 'a', but since 's' was already used for 'spike', I thought 'a' would be a good idea as it kept my fingers on home keys A, S, and D.

So once all I had all these verb shortcuts, I then proceeded to input player shortcuts. I wanted shortcuts for both a player's full name for the first mention in the article, as well as shortcuts for their surname for every subsequent mention. Thus, the host team Japan ended up as you see in the list below. Eventually, for a few of the more prominent players, I began to insert not just their full names, but also HTML links that would go to that player's FIVB profile page. This was not required, but I thought it would help provide readers with a little bit more info if they needed it. For this I made use of the Markdown bundle (included in TextMate), which let me format links thusly:  [example]( "Title").

Surnames only:

  • j1 = Kurihara
  • j2 = Nakamichi
  • j3 = Takeshita
  • j4 = Inoue
  • j5 = Yamamoto
  • j6 = Sano
  • j7 = Yamaguchi
  • j11 = Araki
  • j12 = Kimura
  • j14 = Ebata
  • j16 = Sakoda
  • j17 = Ino
  • jcoach = Masayosi Manabe

Full names:

  • j = Megumi Kurihara
  • j = Hitomi Nakamichi
  • j = Yoshie Takeshita
  • j = Kaori Inoue
  • j = Ai Yamamoto
  • j = Yuko Sano
  • j = Mai Yamaguchi
  • j = Erica Araki
  • j = Saori Kimura
  • j = Yukiko Ebata
  • j = Saori Sakoda
  • j = Akiko Ino
  • j = Masayosi Manabe

In the first column, you'll notice that all players received the 'j' shortcut. What happens here is that when I press 'j'+[TAB] I get a drop down menu from which I can then select the desired player like so:



If there are any volleyball reporters who would like to download this bundle (are there many out there?), please feel free to do  so. Suggestions on how to improve this are most welcome. 


SEE volleyball.tmbundle ON GITHUB

*Note that not all the teams that competed in the World Championships are included, just the teams that I covered: Japan, Russia, Peru, Algeria, Serbia, Costa Rica, Poland, Cuba, China, Italy, Germany, Turkey, and the Netherlands.

Possible improvements: If each point was recorded in 'comment, team1 score, team 2 score' format, then the whole file could be saved as a CSV file, and viewed as a line graph perhaps. Or the text could be analyzed to see which player is mentioned most or to find the longest runs of unanswered points. Forking welcome. :)


An awesome use of snippets for reporting on volleyball matches: than a minute ago via Tweetie for Mac


The markdown format

Saw the YouTube video.

You can set your language to Markdown in TextMate. You could also save your document with ".md", ".mdown" or ".markdown" as an extension.

The syntax highlighting will help.

Re: The markdown format

Nice one. I'm relatively new to TextMate, so thanks for pointing that out. The highlighting does indeed help!

This is awesome.Here's one

This is awesome.

Here's one suggestion: Put the code on Github so other people can fork it and add other teams, or even other sports.


Good idea! Here it is on github.