IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    Vim初始化设置

    Fish (fsh267@gmail.com)发表于 2015-02-17 00:00:00
    love 0

    Vim使用vundle安装插件比较方便,类似pip npm等等。

    安装和配置

    下载vundle

    $ git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

    在.vimrc中添加如下内容

    set mouse=a		" Enable mouse usage (all modes)
    set autoindent
    set smartindent
    set nu
    set ts=4
    set shiftwidth=4
    set softtabstop=4
    set expandtab
    set smarttab
    colorscheme elflord
    inoremap jk <ESC>:w
    
    set nocompatible                " be iMproved
    filetype off                    " required!
    set rtp+=~/.vim/bundle/vundle/
    call vundle#rc()
    
    " let Vundle manage Vundle
    Bundle 'gmarik/vundle'
    
    "my Bundle here:
    "
    " original repos on github
    Bundle 'kien/ctrlp.vim'
    Bundle 'sukima/xmledit'
    Bundle 'sjl/gundo.vim'
    Bundle 'jiangmiao/auto-pairs'
    Bundle 'klen/python-mode'
    Bundle 'Valloric/ListToggle'
    Bundle 'SirVer/ultisnips'
    Bundle 'scrooloose/syntastic'
    Bundle 't9md/vim-quickhl'
    Bundle 'Valloric/YouCompleteMe'
    " Bundle 'Lokaltog/vim-powerline'
    Bundle 'scrooloose/nerdcommenter'
    "..................................
    " vim-scripts repos
    Bundle 'YankRing.vim'
    Bundle 'vcscommand.vim'
    Bundle 'ShowPairs'
    Bundle 'SudoEdit.vim'
    Bundle 'EasyGrep'
    Bundle 'VOoM'
    Bundle 'VimIM'
    "..................................
    " non github repos
    " Bundle 'git://git.wincent.com/command-t.git'
    "......................................
    filetype plugin indent on
    let g:yankring_history_dir = '/home/fish/.vim'

    设置YCM

    安装完成后,ycm报错,需要进入插件目录重新安装一下

    cd ~/.vim/bundle/YouCompleteMe
    ./install.sh --clang-completer

    安装插件

    进入vim ,执行 :BundleInstall

    其他

    更新插件:BundleUpdate 清除不再使用的插件:BundleClean, 列出所有插件:BundleList 查找插件:BundleSearch

    参考文章

    http://zuyunfei.com/2013/04/12/killer-plugin-of-vim-vundle/

    http://blog.marchtea.com/archives/175

    END



沪ICP备19023445号-2号
友情链接