在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

?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容