EsFormatter
JavaScript formatter plugin for Sublime Text
Details
Installs
- Total 21K
- Win 10K
- Mac 8K
- Linux 3K
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 | Aug 3 | Aug 2 | Aug 1 | Jul 31 | Jul 30 | Jul 29 | Jul 28 | Jul 27 | Jul 26 | Jul 25 | Jul 24 | Jul 23 | Jul 22 | Jul 21 | Jul 20 | Jul 19 | Jul 18 | Jul 17 | Jul 16 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 2 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 1 | 1 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 |
Linux | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 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.