Pydiction allows you to achieve TAB code completion in Vim, you can fill the whole contents include: standard, custom, and third-party modules and packages. Plus keywords, BIFs, and strings.
Pydiction by the three main files:
• python_pydiction.vim - This file is a Vim plugin file to achieve Python file TAB completion.
• complete-dict - This file is a Vim dictionary file, which contains Python keywords and modular structure and other information. Reference file plugin performed completion are looking for.
• pydiction.py - (Optional) This file is Python script files used to generate the dictionary file. You can add more modules can TAB completion by executing the script.
Key input portion Python module name, the name of the property or method in Vim, and then press the Tab key to bring up the full complement of information.
For example, enter
Will pop up
If you find complete results obtained in the TAB menu is not what you want, a possible reason is that you do not set Vim to ignore case. By: setting mode "set noic".
how to install:
In UNIX / LINUX under the python_pydiction.vim into ~ / .vim / after / ftplugin /, if the directory does not exist, manually create, Vim will automatically go to the directory to find the relevant documents. Do not put other files in addition to python_pydiction.vim placed in the directory.
Add the following fields in your vimrc file to enable ftplugins:
filetype plugin on
Then be sure to set "g: pydiction_location" point to the full path of the file you put complete-dict where, for example,
let g: pydiction_location = 'C: / vim / vimfiles / ftplugin / pydiction / complete-dict'
Internet was to make the following settings can refer to
# Unzip pydiction-1.2.zip
# Cp python_pydiction.vim / usr / share / vim / vim70 / ftplugin
# Mkdir / usr / share / vim / vim70 / pydiction
# Cp complete-dict pydiction.py / usr / share / vim / vim70 / pydiction /
# Vi ~ / .vimrc
let g: pydiction_location = '/ usr / share / vim / vim70 / pydiction / complete-dict'
let g: pydiction_menu_height = 20
Open the python script file when writing python program, press the TAB key to activate auto-complete menu.