O'Reilly logo

Mastering Vim by Ruslan Osipov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Syntax checking code with linters

Syntax checking (also known as linting) has essentially become a staple in any multi-person software project. There are many linter programs available online, which support different languages and styles.

Python code has it easier than many languages out there, as it tends to adhere to a single standard—PEP8 (https://www.python.org/dev/peps/pep-0008). The most common linters that make sure the code adheres to PEP8 are Pylint, Flake8, and autopep8.

Before proceeding, make sure one of these (the following examples work with Pylint) is installed on your machine, as Vim merely calls external linters.

If you're on a Debian-flavored distribution, you can run sudo apt-get install pylint3 to install Pylint for Python3. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required