By josh / May 8, 2014

“My favourite part is receiving emails telling me how grateful they are”

James Brooks has written several plugins, including one I’ve used and written about previously, InsertNums, that makes it easy to quickly add a sequence of incrementing numbers. (You can finally stop numbering your BASIC by hand!)

I asked him to share some of what he’s learned in the process. Here’s what he had to say about the pain points involved and the rewards of getting his plugins out there.

Tell me a bit about yourself.

My name is James Brooks or @jbrooksuk everywhere online. I’m currently working for Blue Bay Travel as the Lead Web Developer. I sometimes blog at but I’m lazy and forget to.

What’s the name of your plugin? What does it do?

I’ve developer and contributed to a few Sublime plugins over the last couple of years, InsertNums, Evaluate and TabsToTable for instance. However my latest, Sublime Pebble is being developed to ease writing apps and watch faces for the Pebble watch. Although in its early stages, Sublime Pebble will turn Sublime into the one-stop editor for writing Pebble code.

How did you get the idea for your plugin?

I started writing a watch face for my Pebble watch and I was having to switch back and forth between Sublime and the Terminal to push the app and read the debug logs. It was really annoying.

How much time did you spend writing the first version?

Only a few hours (spread across a couple of days). It’s nowhere near complete but lets me do the basic stuff.

Did you think building a plugin would be difficult? Was it easier or harder than you thought it would be?

When I started writing Sublime plugins I’d only touched an existing Python script that downloaded a bunch of MP3 files automatically. It turned out to be easier than I expected probably due to my experience in other programming languages. The API was the hardest thing to get my head around and I needed to understand Sublime better to realise everything.

What was the most challenging part of building your plugin?

With Sublime Pebble the hardest part was making it run a third-party command through Python. I’d never done something like that before and it took a while to get that working, but I’m glad I was persistent with it.

What was your favorite part of creating your plugin?

Releasing a beta version on the Pebble forums. People had been briefly mentioned it before and I was happy that I’d taken the time to get started on it. Regarding other plugins and colour schemes, my favourite part is receiving emails telling me how grateful they are for it.

Did you learn anything along the way that you wish you’d know when you were starting out?

Python is a great language. It’s flexible and pretty straight forward. The Sublime API docs are sometimes limited in the information they provide which can be a great source of pain. The best advice I can give is to read the source of other plugins and understand how they work. There are some great Sublime plugin developers who can teach you a great deal of things!

Did your plugin grow or change as you built it? Did you have to modify your plans based on what the Sublime plugin APIs could do?

Sublime Pebble started as a plugin which extended the menu bar, but I soon realised that I never use the menu bar (go command palette) and so I switched to that. Thankfully this was pretty straight forward. Not a lot of code was changed due to this realisation.

What plugin ideas do you have? Like James, you can put your own stamp on the Sublime community. You have an opportunity to make life just a little easier for thousands of fellow Sublime users.

If you’d like to take the next step in your journey to Sublime mastery, sign up for the Sublime Text Tips newsletter today:

About the author


Click here to add a comment

Leave a comment: