bgneal@8: pyflakes-vim bgneal@8: ============ bgneal@8: bgneal@8: A Vim plugin for checking Python code on the fly. bgneal@8: bgneal@8: PyFlakes catches common Python errors like mistyping a variable name or bgneal@8: accessing a local before it is bound, and also gives warnings for things like bgneal@8: unused imports. bgneal@8: bgneal@8: pyflakes-vim uses the output from PyFlakes to highlight errors in your code. bgneal@8: To locate errors quickly, use quickfix_ commands like :cc. bgneal@8: bgneal@8: Make sure to check vim.org_ for the latest updates. bgneal@8: bgneal@8: .. _pyflakes.vim: http://www.vim.org/scripts/script.php?script_id=2441 bgneal@8: .. _vim.org: http://www.vim.org/scripts/script.php?script_id=2441 bgneal@8: .. _quickfix: http://vimdoc.sourceforge.net/htmldoc/quickfix.html#quickfix bgneal@8: bgneal@8: Quick Installation bgneal@8: ------------------ bgneal@8: bgneal@8: 1. Make sure your ``.vimrc`` has:: bgneal@8: bgneal@8: filetype on " enables filetype detection bgneal@8: filetype plugin on " enables filetype specific plugins bgneal@8: bgneal@8: 2. Download the latest release_. bgneal@8: bgneal@8: 3. If you're using pathogen_, unzip the contents of ``pyflakes-vim.zip`` into bgneal@8: its own bundle directory, i.e. into ``~/.vim/bundle/pyflakes-vim/``. bgneal@8: bgneal@8: Otherwise unzip ``pyflakes.vim`` and the ``pyflakes`` directory into bgneal@8: ``~/.vim/ftplugin/python`` (or somewhere similar on your bgneal@8: `runtime path`_ that will be sourced for Python files). bgneal@8: bgneal@8: .. _release: http://www.vim.org/scripts/script.php?script_id=2441 bgneal@8: .. _pathogen: http://www.vim.org/scripts/script.php?script_id=2332 bgneal@8: .. _runtime path: http://vimdoc.sourceforge.net/htmldoc/options.html#'runtimepath' bgneal@8: bgneal@8: Running from source bgneal@8: ------------------- bgneal@8: bgneal@8: If you're running pyflakes-vim "from source," you'll need the PyFlakes library bgneal@8: on your PYTHONPATH somewhere. (It is included in the vim.org zipfile.) I recommend bgneal@8: getting my PyFlakes_ fork, which retains column number information, giving more bgneal@8: specific error locations. bgneal@8: bgneal@8: .. _vim.org: http://www.vim.org/scripts/script.php?script_id=2441 bgneal@8: .. _PyFlakes: http://github.com/kevinw/pyflakes bgneal@8: bgneal@8: Hacking bgneal@8: ------- bgneal@8: bgneal@8: :: bgneal@8: bgneal@8: git clone git://github.com/kevinw/pyflakes-vim.git bgneal@8: cd pyflakes-vim bgneal@8: git clone git://github.com/kevinw/pyflakes.git bgneal@8: bgneal@8: Options bgneal@8: ------- bgneal@8: bgneal@8: Set this option to you vimrc file to disable quickfix support:: bgneal@8: bgneal@8: let g:pyflakes_use_quickfix = 0 bgneal@8: bgneal@8: The value is set to 1 by default. bgneal@8: bgneal@8: TODO bgneal@8: ---- bgneal@8: * signs_ support (show warning and error icons to left of the buffer area) bgneal@8: * configuration variables bgneal@8: * parse or intercept useful output from the warnings module bgneal@8: bgneal@8: .. _signs: http://www.vim.org/htmldoc/sign.html bgneal@8: bgneal@8: Changelog bgneal@8: --------- bgneal@8: bgneal@8: Please see http://www.vim.org/scripts/script.php?script_id=2441 for a history of bgneal@8: all changes. bgneal@8: