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
  • 4 weeks ago
  • 11 years ago

Installs

  • Total 9K
  • Win 7K
  • Mac 1K
  • Linux 833
Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28
Windows 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1
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 0 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 1 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. :-)