Bundle管理vim插件

原文地址:http://www.jianshu.com/p/062a47c365f1

用 vundle 来管理 vim 插件

  1. 首先vundle 来管理vim 是潮流,并且方便快捷
  2. 它使用类似 Ruby Bundler 的方式来管理插件,你只需要在.vimrc里面用Bundle声明插件

具体参考下面的介绍
vundle.txt

下面介绍下我的安装过程

  • 下载MacVim 
  • 在~/目录下面创建 .vim 目录,然后再创建 .vim/bundle
  • cd ~/.vim/bundle 目录,然后执行 git clone https://github.com/gmarik/vundle.git 等待完成 
  • 在 ~/.vimrc这个文件的头部加上下面这个配置,这个是官网的介绍
  set nocompatible              " be iMproved, required
  filetype off                  " required

  " set the runtime path to include Vundle and initialize
    set rtp+=~/.vim/bundle/vundle/
  call vundle#rc()
    " alternatively, pass a path where Vundle should install plugins
    "let path = '~/some/path/here'
    "call vundle#rc(path)

    " let Vundle manage Vundle, required
    Plugin 'gmarik/vundle'

    " The following are examples of different formats supported.
    " Keep Plugin commands between here and filetype plugin indent on.
    " scripts on GitHub repos
    Plugin 'tpope/vim-fugitive'
    Plugin 'Lokaltog/vim-easymotion'
    Plugin 'tpope/vim-rails.git'
    " The sparkup vim script is in a subdirectory of this repo called vim.
    " Pass the path to set the runtimepath properly.
    Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
    " scripts from http://vim-scripts.org/vim/scripts.html
    Plugin 'L9'
    Plugin 'FuzzyFinder'
    " scripts not 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'
    " ...

    filetype plugin indent on     " required
    " To ignore plugin indent changes, instead use:
    "filetype plugin on
    "
    " Brief help
    " :PluginList          - list configured plugins
    " :PluginInstall(!)    - install (update) plugins
    " :PluginSearch(!) foo - search (or refresh cache first) for foo
    " :PluginClean(!)      - confirm (or auto-approve) removal of unused plugins
    "
    " see :h vundle for more details or wiki for FAQ
    " NOTE: comments after Plugin commands are not allowed.
    " Put your stuff after this line
  • 随便开个窗口,从控制台打开vim , 执行 :PluginInstall,即可安装 Plugin 指定的插件
  • 我在.vimrc 文件中,在最后一行加载 填写 

           Bundle 'rking/ag.vim'

    在执行:PluginInstall 就会安装我的ag.vim

    最后在我的MacVim就可以使用  :Ag bababab 就可以使用了。
    顺便说下,比 ack 更快更好用的东东:the silver searcher, 速度能提升5倍。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值