From charlesreid1

Black is the uncompromising code formatter: https://black.readthedocs.io/en/stable/

Why Use Black

Lessons learned about gofmt. Also see blog post at https://charlesreid1.github.io/any-color-you-like-as-long-as-its-00add8.html

Installation Instructions

To install black:

Make a vim plugin directory

mkdir -p ~/.vim/plugin

Now copy the black vim plugin into the plugin folder:

cd ~/.vim/plugin && wget https://github.com/psf/black/blob/master/plugin/black.vim

Next start vim up and let black go through the installation/setup process:

vim

Now you should be all set.

Scripting

To script the installation of Black and the setup of a vim plugin for Black,

Related Style Tools

Flake8 - a set of Python formatting standards, or rules, that can be applied to Python code. Flake8 is different from Black in that it does not apply any fixes, it simply complains about things that don't follow the standard.

Autopep8 - automatically forces code to conform to PEP8 standard.

Flags