vim插件管理利器——vundle

尝试了一段时间的vim,终究不如IDE好用,找不到黑客的感觉。实在忍不了一天天苦练vim的命令了,先找找插件感受一下vim的灵活吧,至少往IDE的感觉上靠一靠,也能凑合先代替IDE进行开发呀。
vim的插件都放在~/.vim路径下,但不是很好管理,网上说vundle是个不错的vim插件管理工具,尝试下,的确不错,该项目托管在github上,README已经讲的蛮清楚了,github路径如下:
首先下载vundle
git clone   https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
然后是配置插件
配置信息主要写在~/.vimrc中,示例内如如下,其中单个双引号表示注释。
set nocompatible            " be iMproved, required
file type off                      " required
" set the runtime path to include Vundle and initialize
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'

" The following are examlpes of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly
Plugin 'rstacruz/sparkup'
" Avoid a name conflict with L9
Plugin 'user/L9', {'name': 'newL9'}

" All of your Plugins must be add before the following line
call vundle#end()                " required
filetype plugin indent on    " required
" To ignore plugin indent chanes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList                - lists configured plugins
" :PluginInstall           - install plugins; append '!' to update or just :PluginUpdate
" :PluginSearch foo   - searches for foo; append '!' to refresh local cache
" :PluginClean           - confirms removal of unused plugins; append '!' to auto-approve removal
" see :h vundle for more details or wiki for FAQ
" put your non-Plugin stuff after this line
这个例子中给出了各种添加插件的方式,比如从github添加,从本地添加,从vim-scripts.org网站上添加,从其他git服务器上添加等。最常用的应该就是从github上添加了。看起来用vundle管理vim插件的方式还是不错的,只需要保存.vimrc这个文件,就可以在不同的机器上同步自己的配置了。
配置文件写好后,就是安装插件
在vim中执行命令
:PluginInstall,然后就会看到左半屏幕开始安装插件,但是如果有找不到的插件会卡住,恐怕需要关掉vim然后修改.vimrc文件。
也可以在命令行中安装插件,命令为:
vim +PluginInstall +qall
也可以在vim中查看vundle的帮助,命令为
:h vundle
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值