Pydiction : Tab-complete your Python code
| script karma
Downloaded by 55957
Comments, bugs, improvements
script versions (upload new version)
|Pydiction allows you to Tab-complete Python code in Vim such as keywords, built-ins, standard library, and third-party modules.
For the latest version of Pydiction and full documentation, see: http://rkulla.github.io/pydiction/
It doesn't require installing any dependencies. It simply consists of three files:
python_pydiction.vim -- Vim plugin that autocompletes Python code.
complete-dict -- Dictionary file of Python keywords, modules, etc.
pydiction.py -- Python script to add more words to complete-dict.
The bundled dictionary comes with most terms you will likely need in your day-to-day Python programming, and the included
Python script allows you to easily append new modules to the dictionary. So you don't have to wait around for me to add them.
And you can teach Pydiction to complete your project's own API very quickly. Some third-party libraries already supported are:
`Django` `Flask` `Requests` `Twisted` `Numpy` `Psycopg2` `PyGreSQL` `SQLite3` `MySQLdb` `OpenGL` `Pygame` `wxPython`
`PyGTK` `PyQT4` `OpenID` `lxml` `urwid` `Celery` `Scrapy` and more.
|If you have Pathogen installed:
git clone https://github.com/rkulla/pydiction.git
or use a plugin manager like Vimogen (https://github.com/rkulla/vimogen) to install and manage Pydiction and all of your plugins.
- UNIX/LINUX/OSX: Put python_pydiction.vim in ~/.vim/after/ftplugin/
(Create this directory if doesn't yet exist. Vim looks there automatically)
- WINDOWS: Put python_pydiction.vim in C:\vim\vimfiles\ftplugin\
(Assuming you installed Vim to C:\vim\)
You may install complete-dict and pydiction.py anywhere (see the Configuration section),
but only python_pydiction.vim in the ftplugin directory because for .vim files only.
In your vimrc file, first add the following line to enable filetype plugins:
filetype plugin on
then make sure you set g:pydiction_location to the full path of where you installed complete-dict. Ex:
let g:pydiction_location = '/path/to/complete-dict'
for example, if you used Pathogen to install Pydiction, you would set this to:
let g:pydiction_location = '/home/user/.vim/bundle/pydiction/complete-dict'
and the dictionary will be available to all of your virtualenv's as well.
You can change the height of the completion menu by setting g:pydiction_menu_height in your vimrc:
let g:pydiction_menu_height = 3
The default menu height is 8, meaning 8 items at a time will be shown. Some people prefer more or less and you can make it as large as you want since it will automatically know where to position the menu to be visible.
Note: If you were using a version of Pydiction less than 1.0, make sure you delete the old pydiction way of doing things from your vimrc. You should ***NOT*** have this in your vimrc anymore:
autocmd FileType python set complete+=k/path/to/pydiction iskeyword+=.,(
endif " has("autocmd")
If you want to configure other things, such as how to get Pydiction to work with other plugins like `SnipMate` or the color of the menu, see the `Tips` section of the documentation.
Click on the package to download.
ip used for rating: 18.104.22.168
||Adds scrapy, lxml, urwid and celery. Adds better completion defaults. Removes extra blank lines. Adds better checking for missing attributes.
||Adds latest 2.7 versions of every built-in/stdlib thing and includes Django, Flask, Requests, Psycopg2 and more. Also adds more completion marker info to the dictionary such as what is a root module, and what version of python and which operating system was use to generated dictionary items.
||Updated file structure for Pathogen and misc. code cleanup
||Added "from module" completion, Tab backwards support, and more third party libs.
||Added quoted string method completion, ZSI Web Services module completion and fixed a bug with the -v option.
||I Rewrote everything. It's now an ftplugin and uses the Tab key for completion. The dictionary generator works much better and you have more options.
||Added support for ldap, cleaned up some code and included a gnu license.
||support for Numeric and numarray
||This version allows you to supply multiple module names to pydiction.py and it will auto-append them to the pydiction file. The included pydiction file now contains support for wxPython and Twisted.
||Added support for Pygame to pydiction. And im supplying the source code to the pydiction generator so people can extend pydiction so that they can have auto-completion for their own modules/functions/etc