How to use Sublime text with Arduino?

Mix together the awesome powers of Sublime Text and Arduino, you get super flexible work environment and won’t have sore eyes after hours of coding.

Why Do I want to do this?

To do some serious work with arduino, the default IDE is, well lacking. There are many alternatives available to code in arduino without the IDE. The simplest way to do this is to use an external editor in the Arduino IDE’s preferences menu. If you want command like control of arduino there is ino. If you are used to using full blown IDE you can use Atmel studio with arduino extension, developed by visual micro.

I’ve used ino for a while, as the a replacement of the Arduino IDE and notepad++ as the editor. Moving back an forward between windows was not working out for me, and resizing the windows was taking away the editor real estate. I found using Sublime with Arduino the best solution,it also works on Linux windows and mac. I’ve been using it on windows and linux machines for about a year now and its working great.

Getting the tools

You probably already have an installed version of Arduino if not you can download it from here. I generally download the zip file, as I have couple of versions, its easy to manage with zip files

Next , you need to download sublime text from here.

Configuration

If you already have package control install in your sublime text, skip this step.

First step is to install package manger in your sublime text, think of it as installing the app store. Go to this site. Copy the python script listed in the box. Open sublime text, go to View>Show Console. Paste it in and hit enter, you will be prompted to restart sublime.

https://flic.kr/p/CjpbqU

Hit Ctrl+Shift+P , this will open a menu, type in ‘package control install’ this will search for available packages, if running for the first time, it might take a couple of seconds to load the repositories , type in ‘arduino’, select Arduino-like-ide, it will start the installation, you can see the status at the bottom of the sublime window. After installation ‘Arduino’ will be displayed in the menu bar.

https://flic.kr/p/BNcL7t

https://www.flickr.com/photos/29500380@N05/23780676101/in/dateposted-public/

Next you need to point the plugin to the Arduino installation folder. Go to Arduino>Preference>Selecet Arduino Application Folder.

https://flic.kr/p/BUzjMS

My favorite feature is to use side by side code editing like below.

https://flic.kr/p/BpcsL9

To do this go to View>Layout>Column:2, now to show the same file in the new column, got to File>New View into File, now drag the tab to the new column.

Happy Coding!!