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

JS Var Shortcuts

by twolfson ALL

Insert and delete shortcuts for JavaScript variables in Sublime Text

Details

Installs

  • Total 1K
  • Win 707
  • Mac 188
  • Linux 147
Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4
Windows 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
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 2 0 1 1 1 0
Linux 0 0 0 0 0 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 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

sublime-js-var-shortcuts Build status

Insert and delete shortcuts for JavaScript variables in Sublime Text

This was built for (1) quickly setting up and tearing down variables, (2) proof of concept for Sublime Text plugin testing framework.

Currently, only tear down is supported.

Deletion screencast

Getting Started

Requirements

You must have node installed on your machine. We use esprima to locate the var statements.

Installation

This package is available under JS Var Shortcuts inside of Package Control, a Sublime Text plugin that allows for easy management of other plugins.

If you prefer the manual route, you can install the script via the following command in the Sublime Text terminal (ctrl+`) which utilizes git clone.

import os; path=sublime.packages_path(); (os.makedirs(path) if not os.path.exists(path) else None); window.run_command('exec', {'cmd': ['git', 'clone', 'https://github.com/twolfson/sublime-js-var-shortcuts', 'JS Var Shortcuts'], 'working_dir': path})

Packages can be uninstalled via “Package Control: Remove Package” via the command pallete, ctrl+shift+p on Windows/Linux, command+shift+p on Mac.

Usage

By default, we bind variable deletion to ctrl+backspace on Windows/Linux, command+backspace on Mac. If no variables are selected, the default action (delete word on left) will be taken.

If you would like to add your own key binding, the deletion command is available as js_var_delete.

{
  "keys": ["ctrl+delete"],
  "command": "js_var_delete"
}

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Test via nosetests.

Donating

Support this project and others by twolfson via gittip.

Support via Gittip

License

Copyright © 2013 Todd Wolfson

Licensed under the MIT license.