Random thoughts shooting out of volatile mind
VIM auto-complete feature for GAE (python) using PyDiction
In my one of the previous post on Vim auto-complete features, I used pydiction plugin to configure  the Python auto-complete in vim. Same pydiction plugin comes with a handy python script called pydiction.py which allows you to add new module to the existing python auto-complete dictionary "complete-dict".
For adding GAE to this auto-complete dictionary follow these steps.
1. Extract the google-appengine to say bin folder in your home directory. For eg .home/user/bin/google-appengine.
2. Now add a symbolic link to this folder in your python's site-packages directory which is found in /usr/lib/python2.x/site-packages. You can use this command for the purpose but remember to change the version number of python appropriately.
cd /usr/lib/python2.5/site-packages
sudo ln -s ~/bin/google-appengine/google

3. Now go into the folder ~/.vim/pydiction1.x/ (if you followed my instruction to setup  pydiction or wherever you have the complete-dict and pydiction.py) and run the following command
pydiction.py google
pydiction.py google.appengine
pydiction.py google.appengine.api
As you encounter more module keep extending your dictionary set using pydiction.py. Note that pydiction.py backs up your complete-dict file each time you run it to a file complete-dict.last. So its better or shall I say its mandatory to have complete-dict and pydiction.py in same folder.
Thats all folks now you can program GAE with your vim without bothering to use memory hogging eclipse IDE. Enjoy !!! :)

Vasudev



Posted by: copyninja on Sunday, 18 April 2010

blog comments powered by Disqus
Fork me on GitHub