Vim is a text editor which uses keyboard shortcuts for editing instead of menus
or icons. There exist a couple of plugins and settings for the VIM editor to
aid python development. If you only develop in Python, a good start is to set
- the default settings for indentation and linewrapping to values compliant with
+ the default settings for indentation and line-wrapping to values compliant with
`PEP 8 <http://www.python.org/dev/peps/pep-0008/>`_. In your home directory,
open a file called `.vimrc` and add the following lines: ::
autocmd BufWritePost *.py call Pyflakes()
autocmd BufWritePost *.py call Pep8()
+If you are already using syntastic_ you can enable it to run Pyflakes on write
+and show errors and warnings in the quickfix window. An example configuration
+to do that which also shows status and warning messages in the statusbar would be::
+
+ set statusline+=%#warningmsg#
+ set statusline+=%{SyntasticStatuslineFlag()}
+ set statusline+=%*
+ let g:syntastic_auto_loc_list=1
+ let g:syntastic_loc_list_height=5
+
.. _indent: http://www.vim.org/scripts/script.php?script_id=974
.. _syntax: http://www.vim.org/scripts/script.php?script_id=790
.. _vim-pyflakes: https://github.com/nvie/vim-pyflakes
.. _PEP8: http://pypi.python.org/pypi/pep8/
.. _vim-pep8: https://github.com/nvie/vim-pep8
+.. _syntastic: https://github.com/scrooloose/syntastic
.. todo:: add supertab notes
$ cd my_project
$ virtualenv venv
- ``virtualenv venv`` will create a folder in the currect directory
+ ``virtualenv venv`` will create a folder in the current directory
which will contain the Python executable files, and a copy of the ``pip``
library which you can use to install other packages. The name of the
virtual environment (in this case, it was ``venv``) can be anything;