]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

added instructions for PyCharm File Watcher setup (#418)
authorBenjamin Wohlwend <bw@piquadrat.ch>
Fri, 17 Aug 2018 15:44:55 +0000 (17:44 +0200)
committerŁukasz Langa <lukasz@langa.pl>
Fri, 17 Aug 2018 15:44:55 +0000 (16:44 +0100)
* added instructions for PyCharm File Watcher setup

With these steps, PyCharm will run black on every file save.

* Update README.md

README.md

index e36023295edbb5c9462d566dce2f8ff7514833fc..3becfd325d7ce96a42ab73402f0bbb1283dba599 100644 (file)
--- a/README.md
+++ b/README.md
@@ -619,11 +619,22 @@ $ where black
     - Name: Black
     - Description: Black is the uncompromising Python code formatter.
     - Program: <install_location_from_step_2>
-    - 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`.
 
+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:
+        - Name: Black
+        - File type: Python
+        - Scope: Project Files
+        - Program: <install_location_from_step_2>
+        - Arguments: `$FilePath$`
+        - Output paths to refresh: `$FilePathRelativeToProjectRoot$`
+        - Working directory: `$ProjectFileDir$`
 
 ### Vim