/robotc-sublime-text-plugin

RobotC Sublime Text Plugin

Primary LanguageJavaScriptMIT LicenseMIT

RobotC Sublime Text 3 plugin package

A plug-in package for Sublime Text 3 (http://www.sublimetext.com/) for writing RoboMatter RobotC (http://www.robotc.net/) code for Vex EDR 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 need the IDE for that.

Functionality

The plug-in provides the following functionality:
  1. C syntax color formatting via the Command Palette.
  2. Basic C code snippets via the completions list.
  3. RobotC functions and variables completions via the completions list.
  4. Search for relevant RobotC functions and variables by category via the completions list.
All RobotC platforms are covered but completions are specific to the VEX Cortex.

Installation:

  1. Copy RobotC_v*-*.sublime-package to ~/Library/Application Support/Sublime Text 3/Installed Packages on Mac OS X. There are Linux and Windows installation instructions at http://docs.sublimetext.info/en/latest/extensibility/packages.html
  2. 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 (http://wbond.net/sublime_packages/package_control)

Usage

Once RobotC syntax selected. The main RobotC functionality is in the functions and variables completion list.
  1. 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.
  2. To search for all the functions and variables within a RobotC category, start typing a category name in UPPER case e.g. 'MOTORS' will list all the commands related to motors.
  3. 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.
  • 0.3 - full Update to make VEX specific, add competiotn template snippet, change file extension to robotc so as not to clash with normal C files

Attribution:

  1. Original author 'mike >-at-< mikemcfarlane >-dot-< co >-dot-< uk'
  2. RobotC.sublime-completions is built around 'BuiltInVariables.txt' provided with the RobotC IDE installation.
  3. RobotC.tmLanguage is currently a lightly edited copy of the file 'C.tmLanguage' included with Sublime Text.
  4. 2015 updates by jpearman.

License:

MIT