First of all, thank you for asking this question, because it made me understand it myself, and it's great!
Here is the page I used as a link: PySmell v0.6 released: orestis.gr
- Install PySmell using the
setup.py install command. - Create the
PYSMELLTAGS file for django by going to your site-packages/django directory and running: pysmell . -o ~/PYSMELLTAGS.django pysmell . -o ~/PYSMELLTAGS.django - Copy this file to the project directory, and then run
pysmell . to generate the PYSMELLTAGS project file - Make sure pysmell is in your
PYTHONPATH ( export PYTHONPATH=${PYTHONPATH}:/path/to/pysmell/ ) - Run vim (
vim . ) - Source
pysmell.vim ( :source /path/to/pysmell/pysmell.vim ) - Set the autocomplete command (
:set omnifunc=pysmell#Complete ) - Enter ^ x ^ o for autocomplete and it should work
I understand that this is not a sustainable solution, but you should be able to use it as a start to configure it to always work (for example, add an export to your .bashrc, add: source to your .vimrc, setup autocmd FileType python set omnifunc=pysmell#Complete , etc.)
Let me know if this is enough to get you started. It worked for me!
Edit I just added this to my .vimrc and as long as the PYSMELLTAGS and PYSMELLTAGS.django are in my project root directory, it works fine without any other work:
python << EOF import os import sys import vim sys.path.append("/usr/local/python/lib/python2.5/site-packages") EOF exe ":source ~/src/pysmell/pysmell.vim" autocmd FileType python set omnifunc=pysmell
bchang Jun 11 '09 at 0:32 2009-06-11 00:32
source share