python——vim补全
Pydiction 可以是我们使用Tab键自动补全Python代码在Vim,是一款非常不错的插件。
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 ~/.vimmkidr ~/.vim/bundlecd ~/.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 onlet let g:pydiction_menu_height = 3 |
注意下划线标注的项,使用find命令查找complete-dict所在位置
重启命令行窗口后,就可以使用Tab键自动补全python代码了。
浙公网安备 33010602011771号