From charlesreid1

(Created page with "To install black: Make a vim plugin directory <pre> mkdir -p ~/.vim/plugin </pre> Now copy the black vim plugin into the plugin folder: <pre> cd ~/.vim/plugin && wget http...")
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
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:
To install black:


Line 21: Line 29:
Now you should be all set.
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==
{{PythonFlag}}


[[Category:Vim]]
[[Category:Vim]]
[[Category:Python]]
[[Category:Python]]

Latest revision as of 22:14, 8 August 2019

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