在vi中使用Vundle

Vundle

安装

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

配置

在vimrc里

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

使用

添加plugin时,先在vimrc里面加入
Plugin 'tomasr/molokai'
之后执行:BundleInstall
如要删除,先在vimrc里面删掉Plugin,之后执行BundleClean

ultisnips

在vimrc中加入
Plugin 'SirVer/ultisnips',
Plugin 'honza/vim-snippets',之后执行:BundleInstall
第一个是引擎,第二个是已经写好的很多模板
自定义方法:
先建立文件 ~/.vim/UltiSnips/python.snippets
之后添加如下

snippet test "test" b
class test():
    pass
endsnippet

效果就是在vi里敲test之后按tab会出现class test

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容