Pydiction can be we use the TAB key to automatically complement the Python code in Vim, is a very good plugin.
Pydiction does not need to be installed, all without any dependency on package issues, pydiction mainly contains 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.
1. Download pydiction:
(1) wget https://github.com/rkulla/pydiction/archive/master.zip #自行下载上传Linux
(2) #这里我使用Git直接下载: Git clone https://github.com/rkulla/pydiction.git
2. Create the directory and copy the file :
MKDIR-PV ~/.vim/tools/pydiction
Cp-r Pydiction/after ~/.vim
CP Pydiction/complete-dict ~/.vim/tools/pydiction
Ensure that the directory structure is as follows:
[Email protected] ~]# tree. Vim
. Vim
├──after
│└──ftplugin
│└──python_pydiction.vim
└──tools
└──pydiction
└──complete-dict
4 Directories, 2 files
Rm-f pydiction #删除程序文件
3. New. vimrc file
Vim ~/.VIMRC
Add the following configuration:
FileType plugin on
Let g:pydiction_location = ' ~/.vim/tools/pydiction/complete-dict '
Let G:pydiction_menu_height = 3
To this configuration complete, the effect
This article is from the "Ljohn" blog, make sure to keep this source http://ljohn.blog.51cto.com/11932290/1931986
Auto-complete Python plugin in Linux vim: pydiction