New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for running Black on save in Vim #255

Merged
merged 2 commits into from May 26, 2018
Jump to file or symbol
Failed to load files and symbols.
+6 −0
Diff settings

Always

Just for now

View
@@ -528,6 +528,12 @@ install *Black* (for example you want to run a version from master),
create a virtualenv manually and point `g:black_virtualenv` to it.
The plugin will use it.
To run *Black* on save, add the following line to `.vimrc` or `init.vim`:
```
autocmd BufWritePost *.py execute ':Black'
```
**How to get Vim with Python 3.6?**
On Ubuntu 17.10 Vim comes with Python 3.6 by default.
On macOS with Homebrew run: `brew install vim --with-python3`.