Pydiction allows you to complete the TAB code in Vim, including standard, custom, and third-party modules and packages. The addition of keywords, BIFs, and Pydiction allows you to complete the TAB code in Vim, including standard, custom, and third-party modules and packages. Plus keywords, BIFs, and strings.
Pydiction consists of three main files:
Python_pydiction.vim -- this file is the Vim plugin file, which implements the TAB complementing function of the Python file.
Complete-dict -- this file is a Vim dictionary file, which contains information such as the Python keyword and module structure. It is a reference file provided by plugin for full-time search.
Pydiction. py -- (optional) This file is a Python script file used to generate a dictionary file. You can execute this script to add more tabs to complete the module.
Usage
=====
Enter some Python keywords, module names, attributes, or method names in Vim, and press the Tab key to display the completion information.
For example, enter
OS. p
Will pop up
OS. pardir
OS. path
OS. pathconf (
OS. pathconf_names
OS. pathsep
OS. pipe (
...
If you find that the result in the TAB completion menu is not what you want, one possible reason is that you have not set Vim to ignore the case. You can set it in the ": set noic" mode.
[How to Install]
In UNIX/LINUX, put python_pydiction.vim ~ /. Vim/after/ftplugin/. if the directory does not exist, manually create it. Vim automatically searches for related files in the directory. Do not put other files except python_pydiction.vim into this directory.
Add the following fields to your vimrc file to enable ftplugins:
Filetype plugin on
Then make sure to set "g: pydiction_location" to point to the full path of your complete-dict file, for example
Let g: pydiction_location = 'C:/vim/vimfiles/ftplugin/pydiction/complete-dict'
For settings, refer
# 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
...
# Add
Let g: pydiction_location = '/usr/share/vim/vim70/pydiction/complete-dict'
Let g: pydiction_menu_height = 20
Open the python script file. when writing a python program, press the TAB key to activate the auto-completion menu.