X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/6b381c784b9d74b78cd9e156a7f936764292bb5a..6af55d885132828be3775f6a7fd1652fdf30ec43:/README.md diff --git a/README.md b/README.md index f454e5a..87ac757 100644 --- a/README.md +++ b/README.md @@ -614,7 +614,7 @@ configuration from different levels of the file hierarchy. Use [proofit404/blacken](https://github.com/proofit404/blacken). -### PyCharm +### PyCharm/IntelliJ IDEA 1. Install `black`. @@ -638,21 +638,29 @@ $ where black %LocalAppData%\Programs\Python\Python36-32\Scripts\black.exe # possible location ``` -3. Open External tools in PyCharm with `File -> Settings -> Tools -> External Tools`. +3. Open External tools in PyCharm/IntelliJ IDEA + + On macOS: + +```PyCharm -> Preferences -> Tools -> External Tools``` + + On Windows / Linux / BSD: + +```File -> Settings -> Tools -> External Tools``` 4. Click the + icon to add a new external tool with the following values: - Name: Black - Description: Black is the uncompromising Python code formatter. - Program: - - Arguments: `$FilePath$` + - Arguments: `"$FilePath$"` 5. Format the currently opened file by selecting `Tools -> External Tools -> black`. - - Alternatively, you can set a keyboard shortcut by navigating to `Preferences -> Keymap -> External Tools -> External Tools - Black`. + - Alternatively, you can set a keyboard shortcut by navigating to `Preferences or Settings -> Keymap -> External Tools -> External Tools - Black`. 6. Optionally, run Black on every file save: 1. Make sure you have the [File Watcher](https://plugins.jetbrains.com/plugin/7177-file-watchers) plugin installed. - 2. Go to `Preferences -> Tools -> File Watchers` and click `+` to add a new watcher: + 2. Go to `Preferences or Settings -> Tools -> File Watchers` and click `+` to add a new watcher: - Name: Black - File type: Python - Scope: Project Files @@ -761,7 +769,7 @@ The formatted code will be returned on stdout (unless `--check` was passed). *Black* will still emit messages on stderr but that shouldn't affect your use case. -This can be used for example with PyCharm's [File Watchers](https://www.jetbrains.com/help/pycharm/file-watchers.html). +This can be used for example with PyCharm's or IntelliJ's [File Watchers](https://www.jetbrains.com/help/pycharm/file-watchers.html). ## blackd @@ -955,6 +963,12 @@ More details can be found in [CONTRIBUTING](CONTRIBUTING.md). * *Black* now properly formats multiple files in parallel on Windows (#632) +* *Black* now creates cache files atomically which allows it to be used + in parallel pipelines (like `xargs -P8`) (#673) + +* *Black* now correctly indents comments in files that were previously + formatted with tabs (#262) + * `blackd` now supports CORS (#622) ### 18.9b0