Linux VIM python 自动补全插件:pydiction

Pydiction不需要安装,所有没有任何依赖包问题,Pydiction主要包含三个文件。

1
2
3
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.

下载Pydiction

1
2
3
4
5
mkdir  ~/.vim
mkidr ~/.vim /bundle
cd  ~/.vim /bundle
#这里我们也可以自己下载好上传到linux系统中
git clone https: //github .com /rkulla/pydiction .git

配置Pydiction

1
2
3
4
#- UNIX/LINUX/OSX: Put python_pydiction.vim in ~/.vim/after/ftplugin/
#- WINDOWS: Put python_pydiction.vim in C:\vim\vimfiles\ftplugin\
# Assuming you installed Vim to C:\vim\
cp  -r ~/.vim /bundle/pydiction/after/  ~/.vim

新建.vimrc文件

1
vim ~/.vimrc

在.vimrc文件添加如下配置:

1
2
3
filetype plugin on
let  g:pydiction_location =  '/home/pi/.vim/bundle/pydiction/complete-dict'
let  g:pydiction_menu_height = 3

到此已经可以使用Tab键自动补全python代码了。  原创:https://www.cnblogs.com/rampb/p/6183076.html

你可能感兴趣的:(Linux VIM python 自动补全插件:pydiction)