Skip to content

Commit b77bcef

Browse files
committed
Merge pull request realpython#540 from vipul-sharma20/docs
fixes realpython#532 added doc for vim-flake8
2 parents 983ed79 + bb593a1 commit b77bcef

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

docs/dev/env.rst

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,14 @@ errors and PEP8 compliance. Luckily PEP8_ and Pyflakes_ will do this for you.
4141
If your Vim is compiled with :option:`+python` you can also utilize some very
4242
handy plugins to do these checks from within the editor.
4343

44-
For PEP8 checking, install the vim-pep8_ plugin, and for pyflakes you can
45-
install vim-pyflakes_. Now you can map the functions ``Pep8()`` or
46-
``Pyflakes()`` to any hotkey or action you want in Vim. Both plugins will
44+
For PEP8 checking and pyflakes, you can install vim-flake8_. Now you can map the
45+
function ``Flake8`` to any hotkey or action you want in Vim. The plugin will
4746
display errors at the bottom of the screen, and provide an easy way to jump to
48-
the corresponding line. It's very handy to call these functions whenever you
49-
save a file. In order to do this, add the following lines to your
47+
the corresponding line. It's very handy to call this function whenever you save
48+
a file. In order to do this, add the following line to your
5049
:file:`.vimrc`::
5150

52-
autocmd BufWritePost *.py call Pyflakes()
53-
autocmd BufWritePost *.py call Pep8()
51+
autocmd BufWritePost *.py call Flake8()
5452

5553
If you are already using syntastic_, you can set it to run Pyflakes on write
5654
and show errors and warnings in the quickfix window. An example configuration
@@ -88,12 +86,11 @@ using ``<Tab>`` key or any other customized keys.
8886
.. _indent: http://www.vim.org/scripts/script.php?script_id=974
8987
.. _syntax: http://www.vim.org/scripts/script.php?script_id=790
9088
.. _Pyflakes: http://pypi.python.org/pypi/pyflakes/
91-
.. _vim-pyflakes: https://github.com/nvie/vim-pyflakes
9289
.. _PEP8: http://pypi.python.org/pypi/pep8/
93-
.. _vim-pep8: https://github.com/nvie/vim-pep8
9490
.. _syntastic: https://github.com/scrooloose/syntastic
9591
.. _Python-mode: https://github.com/klen/python-mode
9692
.. _SuperTab: http://www.vim.org/scripts/script.php?script_id=1643
93+
.. _vim-flake8: https://github.com/nvie/vim-flake8
9794

9895
Emacs
9996
-----

0 commit comments

Comments
 (0)