I’ve written a plug-in package for the excellent Sublime Text 2 for creating and editing RoboMatter RobotC code for Lego Mindstorms NXT and other RobotC platforms. Allows you to write RobotC code on Mac OS X, Linux and Windows in a very clean and fast text editor. Does not compile or debug, you still need the IDE for that. It’s only v0-2 so far and a bit rough around the edges, but I’m finding it quick and elegant and it’s great to be able to write code on Mac or Linux as I’m not a Windows fan.
Download it from my MooSooBoo Github and give it a go. You only need the .sublime-package file. Let me know what you think.
Functionality
The plug-in provides the following functionality:
- C syntax color formatting via the Command Palette.
- Basic C code snippets via the completions list.
- RobotC functions and variables completions via the completions list.
- Search for relevant RobotC functions and variables by category via the completions list.
All RobotC platforms are covered including Lego Mindstorms NXT, VEX, Cortex, PIC, Tetrix and Arduino, although there may be emphasis towards Mindstorms NXT as that is my primary platform.
Installation:
- Copy RobotC_v*-*.sublime-package to ~/Library/Application Support/Sublime Text 2/Installed Packages on Mac OS X. Here are Linux and Windows installation instructions.
- Start Sublime Text and the package should auto-install.
There are a few ways to check this, the easiest is to open the Command Palette and type ‘syntax’ and look for ‘RobotC’ in the list.
Once the code is a bit better I will get it registered to install with the excellent Package Control.
Usage
Once RobotC syntax selected. The main RobotC functionality is in the functions and variables completion list.
- To auto-complete a function or variable, start typing a function name, variable name or code snippet name using lower case and access the completions list with CTRL+spacebar. Each value within a function can be jumped between with the TAB key.
- To search for all the functions and variables within a RobotC category, start typing a category name in UPPER case e.g. ‘BLUETOOTH’ will list all the commands related to bluetooth. (See the file ‘BuiltInVariables.txt’ included with the RobotC IDE installation, or look at the API titles.)
- You can also search in similar way via platform name shortcuts (see the file ‘BuiltInVariables.txt’ included with the RobotC IDE installation) e.g. ‘NT’ for Mindstorms NXT.
- To access code snippets start typing their name in the completions list e.g. ‘main’ or ‘for’. Have a look in the RobotC package directory for current snippets.
Versions:
- 0.1 – getting something working.
- 0.2 – full functions and variables completion with TAB between values. Search via category and platform. Descriptions improved.
To do:
- Create a RobotC specific version of the .tmLanguage file?
- More code snippets e.g. while loops.
- Code snippets often come up twice as the scope of RobotC is the same as C ie .c files. Fix this so snippets only come up once. If this bothers you at the moment, delete the .sublime-snippet files in the RobotC package directory.
- Figure out a quick way to get the code into the RobotC IDE.
- Add support for RobotC Driver Suite from Xander Soldat.
- Review changes from RobotC 3.55, and build in.
- Test it:-))
Bugs:
Report to ‘moo >-at-< moosooboo >-dot-< com’
Attribution:
- RobotC.sublime-completions is built around ‘BuiltInVariables.txt’ provided with the RobotC IDE installation.
- RobotC.tmLanguage is currently a lightly edited copy of the file ‘C.tmLanguage’ included with Sublime Text.
License:
Still not figured this out, but use as you like with a link or credit to myself, and also credit to the files listed in Attributions.
Update 06-03-13
The nice guys at Robomatter gave me a mention http://www.robotc.net/blog/2013/03/04/sublimetexteditor/ Thanks guys!


I wondered what this was for a moment there… then realised it was for the robotics for lego etc
Nice to see you using Sublime Text 2 tho…
ST 2 is just such a nice editor, it’s a real nice space to work in whether I am writing prose or coding. It was a pleasure to buy a license:-)
Pingback: New ROBOTC Code Plugin for Sublime Text Editor at ROBOTC.net Blog
Thanks for the mention, I need to get some updates done on the plugin now!
How are the updates to the sublime plugin coming? I’d love to use it if there was a smooth enough integration with RobotC (running in a Win7 Parallels VM). Though it looks like you’re busy in Moscow
Hi Axel. yes I’ve been pretty busy and so not had much chance to look at the plugin. At this stage I am also waiting to see what the new IDE functions in RobotC 4 are like.