ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Sublime JS

by 75team ST3

Writing Sublime plugins with JavaScript.

Details

  • 2013.12.22.09.12.54
  • github.​com
  • github.​com
  • 11 years ago
  • 34 minutes ago
  • 11 years ago

Installs

  • Total 9K
  • Win 7K
  • Mac 1K
  • Linux 830
Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20
Windows 0 0 0 0 0 0 0 0 0 0 0 0 4 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Sublime JS

Use Google v8 engine to write plugins with JavaScript

Writing plugin with JavaScript:

  • add a package.json file:
{
  "name": "JSDemo",
  "description": "demo plugin powered by SublimeJS",
  "version": "0.1.0",
  "author": {
    "name": "akira-cn",
    "email": "akira.cn@gmail.com"
  },
  "main": "index.js",
  "licenses": [
    {
      "type": "The MIT License",
      "url": "http://www.opensource.org/licenses/mit-license.php"
    }
  ]
}
  • add Javascript files:
/** index.js **/

defineCommand("Hello", require("hello.command"));
/** hello.command.js **/

module.exports = function(view, edit){
    view.insert(edit, 0, "HelloWorld");
}

Examples:

SublimeJS_Samples

Thanks

Thanks to emmet-sublime. Some idea is borrowed from emmet-sublime. :-)