Skip to content
This repository
branch: master

Merge pull request #4 from slang800/master

Fixing up the readme
latest commit 1603b72899
Joshua Hanson authored October 23, 2012
Octocat-spinner-32 .gitignore ignore pyc October 21, 2012
Octocat-spinner-32 History.md Release 0.3.0 October 21, 2012
Octocat-spinner-32 JS2Coffee.py several changes October 21, 2012
Octocat-spinner-32 JS2Coffee.sublime-commands ocd October 21, 2012
Octocat-spinner-32 LICENSE initial commit August 25, 2012
Octocat-spinner-32 README.md Update README.md October 21, 2012
README.md

Sublime JS2Coffee

A quick way to convert Javascript to Coffeescript without leaving Sublime Text 2.

Installation

then, either

  • Install Package Control if you don't already have it.
  • cmd-shift-p Package Control: Install Package -> JS2Coffee

or

  • Clone this repo into your Packages directory (Not Recommended: cloning will not allow you to update automatically).

Usage

cmd-shift-p JS2Coffee:

image

The syntax will be automatically set to CoffeeScript, and either the current file will be replaced with the CoffeeScript convertion, or a new file will be opened containing the conversion (depending on the command you used).

image

Bind a Key Combination

Note: Out of courtesy, there is no keyboard shortcut set by default.

In Packages/User/Default (your OS).sublime-keymap add one of the following lines:

  • { "keys": ["ctrl+shift+j"], "command": "js_coffee", "args":{"new_file": true}}

or

  • { "keys": ["ctrl+shift+j"], "command": "js_coffee", "args":{"new_file": false}}

Troubleshooting

If js2coffee outputs an error message it will show up in Sublime Text's console. There is not always useful context information in these messages, so YMMV.

Something went wrong with that request. Please try again.