Black integration for SublimeText
- License : GNU General Public License v3 or later (GPLv3+)
- Source: https://github.com/jgirardet/sublack
- Default:
- Press Ctrl-Alt-F to format the entire file. You can also Ctrl-Shift-P (Mac: Cmd-Shift-P) and select sublack: Format file.
Install Black (if you haven't already):
pip install black # Requires python 3.6
Waiting for PackageControl Entry, install manually by navigating to Sublime's Packages folder and cloning this repository:
git clone https://github.com/jgirardet/sublack.git
- black_command:
- Set custom location. Default = "black".
- on_save:
- Black is always run before saving file. Default = false.
- line_length:
- Set custom line length option used by Black. Default = null which lets black default.
- debug:
- Show non error messages in console. Default = false. Error messages are always shown in console.
If there is something wrong with this plugin, add an issue on GitHub and I'll try to address it.
This plugin is very inspired by the very good PyYapf Plugin. Thanks to Jason Kane.
- 1.3.3:
- Fix encoding if not given by SublimeText.
- 1.3.2:
- BugFix : Click library Bug with locale under OSX
- 1.3.1:
- update README
- 1.3.0:
- use '-' argument to format inline document wihout saving it
- consequently post-save became pre-save
- line_length typo in settings
- add log
- 1.2.0:
- add error handling (thanks to nicokist)
- 1.1.0:
- add line_length option
- 1.0.0:
- make plugin
- add on_save option