一、vim python自動補全插件:pydiction
可以實現下面python代碼的自動補全:
1.簡單python關鍵詞補全
2.python 函數補全帶括號
3.python 模塊補全
4.python 模塊內函數,變量補全
5.from module import sub-module 補全
插件地址:https://github.com/rkulla/pydiction
wget https://github.com/rkulla/pydiction/archive/master.zip
yum install -y unzip tree
unzip -q master
mv pydiction-master pydiction
mkdir -p ~/.vim/tools/pydiction
cp -r pydiction/after ~/.vim
cp pydiction/complete-dict ~/.vim/tools/pydiction
# tree ~/.vim
/root/.vim
├── after
│ └── ftplugin
│ └── python_pydiction.vim
└── tools
└── pydiction
└── complete-dict
創建~/.vimrc,確保其中內容如下:
[ceo-xsec ~]# cat ~/.vimrc
filetype plugin on
let g:pydiction_location = ‘~/.vim/tools/pydiction/complete-dict’
然后創建一個.py文件測試可以

