1. VIM下的配置:
wget https://github.com/rkulla/pydiction/archive/master.zip
unzip -q master
mv pydiction-master pydiction
mkdir -p ~/.vim/tools/pydiction
cp -r pydiction/after ~/.vim
cp pydiction/complete-dict ~/.vim/tools/pydiction
rm -f pydiction
确保文件结构如下:
# tree ~/.vim
/root/.vim
├── after
│ └── ftplugin
│ └── python_pydiction.vim
└── tools
└── pydiction
└── complete-dict
然后编辑~/.vimrc
# cat ~/.vimrc
filetype plugin on
let g:pydiction_location = '~/.vim/tools/pydiction/complete-dict'
2. Python Console命令行:
# ~/.bashrc
export PYTHONSTARTUP=$HOME/.pythonstartup.py (此变量指向的文件在python命令行启动时会自动加载)
vim ~/.pythonstartup.py
更简单的方式是安装IPython
Original: https://www.cnblogs.com/gnuhpc/p/3947709.html
Author: gnuhpc
Title: 在Python命令行和VIM中自动补全
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/9925/
转载文章受原作者版权保护。转载请注明原作者出处!