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