Meditations on programming, startups, and technology
New Relic

Add code highlighting to your Google Waves

Google Wave is still rough around the edges, but it has a lot of potential in terms of becoming a great collaboration tool. As a developer, your first question will probably be: “How do I add code highlighting to my waves?”. The answer is straightforward, however not very easy to find if you google it. I hope this post will help fellow developers who are experimenting with Google Wave.

The following steps are required to obtain syntax highlighting for your code:

  1. Create a new wave and add the Syntaxy robot to your wave. Use the wave address:
  2. Reply to your first message or within it, thereby creating a reply (called “blip” in Google lingo).
  3. Specify your code’s language, prefixing the name with a hash and exclamation mark, like #!python or #!ruby.

At this point, as you type the code in your blip it will be highlighted by the Syntaxy bot as shown in the picture below:

Highlight code on Google Wave

More advanced automatic syntax highlighting bots will probably appear as Google Wave progresses, but this one should do the trick for now. On a side note, if you copy and paste code from XCode, the code formatting will be kept in your waves and blips without the need for bots.

If you enjoyed this post, then make sure you subscribe to my Newsletter and/or Feed.

receive my posts by email

5 Responses to “Add code highlighting to your Google Waves”

  1. Interesting, thanks, I’ll have to give it a try. Here’s a link to the Wave Sample Gallery page: which also has a 1:46 video demonstration.

  2. Kevin says:

    Can’t get it to do squat for me… Yet I find no evidence in searching the web that it’s completely broken, which leads me to believe either (a) something I’m doing wrong or (b) an incompatibility w/ Ubuntu Karmic and Firefox.

  3. Prasad says:

    Does not work with C code! :-(

  4. Untit1ed says:

    the bot doesn’t work right now, it is over quota.

  5. Martin says:

    Wonderful Robot!

    However, I would be nice if you could use a set of custom tags to highlight snippets of code within normal text:

    #!perl start
    code goes here
    #!perl stop

    And we have normal formatting here.

Leave a Reply

I sincerely welcome and appreciate your comments, whether in agreement or dissenting with my article. However, trolling will not be tolerated. Comments are automatically closed 15 days after the publication of each article.

Copyright © 2005-2014 Antonio Cangiano. All rights reserved.