Vim下安装python补全插件snipmate

一、下载相关插件

cd ~/.vim/bundle
如果没有该目录,创建一个,用来存放相关插件包。

git clone https://github.com/tomtom/tlib_vim.git
git clone https://github.com/MarcWeber/vim-addon-mw-utils.git
git clone https://github.com/garbas/vim-snipmate.git

# Optional:
git clone https://github.com/honza/vim-snippets.git

如果git速度很慢,vim ~/.gitconfig添加以下配置:
[url "https://hub.fastgit.org/"] insteadOf = https://github.com/
使用国内镜像源替换github原站的地址。

snipmate插件原站地址,vim官网,官网已经没有更新了,需要查看其它相关信息的可以向往github,vim-snipmate

二、配置vundle

vundle是vim的插件管理器,首先下载Vundle:
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

下载完成修改vim /etc/vimrc,添加如下配置:

filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'MarcWeber/vim-addon-mw-utils'
Plugin 'tomtom/tlib_vim'
Plugin 'garbas/vim-snipmate'
Plugin 'honza/vim-snippets'
call vundle#end()
filetype plugin indent on
let g:snipMate = { 'snippet_version' : 1 }

Vundle配置相关详细信息请前往github查看,vundle-vim
配置完成后,在vim里执行:
:PluginInstall
之后便可以使用Vim的python补全插件了。
具体快捷命令可查看~/.vim/bundle/vim-snippets/snippets/python.snippets文件。

posted @ 2021-03-29 14:35  yang417  阅读(517)  评论(0)    收藏  举报