EsFormatter
JavaScript formatter plugin for Sublime Text
Details
Installs
- Total 19K
- Win 9K
- Mac 7K
- Linux 3K
Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | Jan 8 | Jan 7 | Jan 6 | Jan 5 | Jan 4 | Jan 3 | Jan 2 | Jan 1 | Dec 31 | Dec 30 | Dec 29 | Dec 28 | Dec 27 | Dec 26 | Dec 25 | Dec 24 | Dec 23 | Dec 22 | Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 2 | 3 | 0 | 0 | 3 | 1 | 0 | 4 | 1 | 2 | 1 | 1 | 0 | 1 | 1 | 0 | 2 | 2 | 1 | 2 | 2 | 0 | 2 | 2 | 2 | 3 | 1 | 0 | 0 | 1 | 2 | 2 | 0 | 2 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 3 | 2 | 2 |
Mac | 2 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 2 | 0 |
Linux | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 2 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Sublime EsFormatter - Sublime Text Plugin
Sublime EsFormatter is a JavaScript formatter plugin for the text editor SublimeText 2/3.
It is based on esformatter, an extremely configurable JavaScript formatter.
Unlike other beautifiers it gives complete control over the coding style.
Requirements
You MUST have Node.js installed globally and included in your $PATH
.
You can either install esformatter
globally or under your current project's node_modules
folder. This complicates the setup slightly but you can configure things anyway you want.
npm install -g esformatter
Installation
Using Sublime Package Control just search for
EsFormatter
Manual installation
This is not recommended, but if you know what you're doing, go on:
Clone this repository or download and unzip inside
Mac
~/Library/Application Support/Sublime Text 3/Packages/EsFormatter
Windows XP
C:\Documents and Settings\<user>\Application Data\Sublime Text 3\Packages\EsFormatter
Windows 7
* C:\Users\<user>\AppData\Roaming\Sublime Text 3\Packages\EsFormatter
Linux
~/.Sublime Text 3/Packages/EsFormatter
Usage
The default keyboard mapping is ctrl+alt+f
or cmd+alt+f
(that is super+alt+f
).
You can change the key binding at: Sublime Text -> Preferences -> Package Settings -> EsFormatter -> Key Bindings - User.
{
// ES Formatter key binding
"keys": ["ctrl+alt+f"], "command": "esformatter"
}
If you are using a custom keyboard mapping, you may want to add the following line in order to restore the Replace Panel default functionality.
{ "keys": ["super+alt+f"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} },
You can also run EsFormatter automatically when saving a file: Sublime Text -> Preferences -> Package settings -> EsFormatter -> Settings - User.
{
// Format the file when saved
"format_on_save": false
}
Configuration
You can configure the options from .esformatter
file, either in your project on globally in your home directory.
Refer to the configuration of esformatter
Contribute
The python script simply calls the global version of esformatter
. Make sure your changes work on all platforms.