vim-python

Though python works well inside vim, there's a few things lacking when compared to the C/C++ capabilities of vim, so I'm going to try to correct them.

First of, I corrected/added on to the old python compiler plugin, making it work a bit more like a 'compiler'.

See here for more. It uses the py_compile package to check for compilation errors without actually running the script. Follow the install instructions, then simply run ':make' to compile the code (and output a corresponding pyc file). Use :cwindow/:clist to view errors, and :cn(ext)/:cp(rev) to flip from error to error (for those not familiar with using vim as a development environment).

You can always adjust the makeprg to and from "python" itself for running with error output, which I may add at some point.

I'm also going to finish up the syntax completion for python, to work with omni completion, as it's rather simple. More forthcoming...

pycomplete.vim is here: http://www.vim.org/scripts/script.php?script_id=1542

Add it to your $VIMRUNTIME/autoload/ dir, and set omnifunc=pycomplete#Complete when editing a python source file. It currently needs a decent amount of work, but it does work for top-level variables (not inside a 'def' statement)... partial completion is borked for now, until I fix the matching.

NOTE: This will be included in the next vim-devel snapshot, so if you have that, no need to download it from here, unless you want the most up-to-date version.

Screenshot:

prev next

| comments