This is a Sublime Text 2 plugin for formatting CoffeeScript. It's based upon this repo.
This project borrows heavily from JsFormat.
To use this package, the command node
must be available. See here for Node installation details.
Assuming you are editing a CoffeeScript file:
Shortcut: ctrl + alt + f
Context Menu: right click -> Select Format CoffeeScript
Command Palette: ctrl + shift + p
-> Select Format: CoffeeScript
Sublime Package Control allows you to easily install or remove Coffee Formatter(and many other ST2 packages) from within the editor.
-
Install Sublime Package Control (if you haven't done so already) from http://wbond.net/sublime_packages/package_control . Be sure to restart ST2 to complete the installation.
-
Bring up the command palette (default
ctrl+shift+p
orcmd+shift+p
) and start typingPackage Control: Install Package
then press return or click on that option to activate it. You will be presented with a new Quick Panel with the list of available packages. TypeCoffee Formatter
and press return or on its entry to install Coffee Formatter. If there is no entry for Coffee Formatter, you most likely already have it installed.