Package Control Messages
JsPrettier
┌────────────────────────────────────────────────────────────────────────────┐
│ _ _ │
│ | |___| | |_| |_(_) _ │
│ | / __| |_) | '__/ _| __| |/ '__| │
│ | |_| __ __/| | | __/ |_| |_| | __/ | │
│ ___/|___/_| |_| ___|__|__|_|___|_| │
│ │
│ Sublime Text Plug-in for Prettier, the opinionated code formatter. │
└────────────────────────────────────────────────────────────────────────────┘
## Getting started
### Install Prettier
If you've already installed Prettier, you're all set... otherwise:
# yarn (local):
yarn add prettier --dev
# yarn (global):
yarn global add prettier
# npm (local):
npm install --save-dev prettier
# npm (global):
npm install --global prettier
### Usage
There are three ways to format code...
- Command Palette
"Ctrl/Cmd + Shift + P", then type "JsPrettier Format Code".
- Context Menu
Right-click the file view and select "JsPrettier Format Code".
Key Binding
There is no default key binding for this plug-in.
To add a key binding, navigate to "Preferences" -> "Key Bindings...", and
add an entry for "js_prettier". For example...{ "keys": ["shift+alt+f"], "command": "js_prettier" }
Change "shift+alt+f" with your preferred key combination.
## Issues
For additional help, including reporting issues, please visit the JsPrettier
home page at https://github.com/jonlabelle/SublimeJsPrettier.
## License
The MIT License (MIT)
Copyright (c) Jon LaBelle
评论 (0)