TextMate support for Arduino
JavaScript Ruby Other
Switch branches/tags
Nothing to show
Pull request Compare This branch is 16 commits ahead, 25 commits behind nasser:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Arduino TextMate Bundle 1.0a

TextMate is the best editor in human history. Arduino is the easiest embedded platform to dive into. Why don't the two work together? The Arduino TextMate Bundle solves that glaring error, and the universe is thus balanced.

There are other TextMate bundles out there, but they're mostly over two years old and don't work with new Arduino versions. This project aims to remain up-to-date and make embedded as enjoyable as everything else in TextMate.

The little 'a' in '1.0a' stands for 'alpha'. Read that as "might not work for you". It will grow and improve with time, but for now brace yourself for bugs. That means bug reports, feature requests and patches!

As of 1.0a, the bundle can compiles and uploads to the device, provides access to the documentation and highlights syntax correctly.


  1. Get the latest Arduino. Version 1.0 and later is supported, and it must be installed to /Applications
  2. Get TextMate.
  3. Get the latest Arduino TextMate bundle.
  4. Extract the zip file to ~/Library/Application Support/TextMate/Bundles/Arduino.tmbundle
  5. If TextMate was open during this process, click Bundles>Bundle Editor>Reload Bundles
  6. Check the 'Default Environment vars' near the top of ~/Library/Application Support/TextMate/Bundles/Arduino.tmbundle/Support/Makefile. Any you need to override - especially check the ARDUINO_MCU var - can be added in TextMate's Preferences => Advanced => Shell Variables or the project specific Shell Variables.


  • ⌘B Compiles your sketch
  • ⌃⌥⌘C Makes the build clean again
  • ⌃⌥⌘R Re-build the project (makes build and clean in on go)
  • ⌘U Compiles and uploads your sketch to the connected Arduino
  • ⌃⌥⌘H Opens up local HTML documentation on to current word
  • Bundles > Arduino > Watch Serial Port Opens a terminal window monitoring the serial port.
  • File > New From Template > Arduino > Basic Sketch Creates a file with a blank basic sketch.
  • Bundles > Arduino > New Sketch (⌃⌥⌘N) Starts a dialog to create a new project (creates a folder with a basic sketch, adds a textmate project file and opens it)

Shell Variables

The compile/upload process can be finely controlled using TextMate's shell variables. (This will be revised in later version to have a dialog for this)

Textmate > Preferences > Advanced > Shell Variables

Variable Value
ARDUINO_PORT The serial port to upload from (defaults to /dev/tty.usbmodem*)
ARDUINO_UPLOAD_RATE The baud rate to upload at (defaults to 115200)
ARDUINO_AVRDUDE_PROGRAMMER The programmer to use (defaults to arduino)
ARDUINO_MCU The Atmel chip on the board (defaults to atmega328p)
ARDUINO_F_CPU The clock speed of the Atmel chip (defaults to 16000000)
ARDUINO_VARIANT The Arduino variant being used. Can be one of standard, micro, mega, leonardo, or eightanaloginputs. (defaults to standard)

Bleeding Edge

For the adventurous

git clone git://github.com/jens-a-e/arduino.tmbundle.git ~/Library/Application\ Support/TextMate/Bundles/Arduino.tmbundle



  • Improved Makefile (using build as directory name, fixed some dependencies)
  • Improved Watch serial port as the script was confused about the path
  • Added comand to create a new project and open it for editing
  • Added some sytle and highlight.js to the compiler output window


  • Fixed for Arduino 1.0
  • Improved local help command
  • Changed versioning scheme to match Arduino's. This bundle's version will always be equal to the version of Arduino it is most compatible with.


  • Added snippets for common methods
  • Added an Arduino project template
  • Altered the monitor script - it's now aware of your USB ports


  • Compile/upload bug fixed
  • Syntax highlighting added
  • Local help added
  • Initial Watch Serial Port implementation
  • More intelligent Makefile with environment variable overrides


  • Initial release, basic implementation of compiling/uploading