我的vimrc

首先git clone一下vundle:

$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

如果github速度过慢:

$ git clone http://git.xuchen.wang/yachen/Vundle.vim.git ~/.vim/bundle/Vundle.vim

然后将以下内容保存为
/etc/vim/vimrc.local

"定义状态栏样式
set statusline=%F%m%r%h%w%=\ [typ=%Y]\ %{\"[cod=\".(&fenc==\"\"?&enc:&fenc).((exists(\"+bomb\")\ &&\ &bomb)?\"+\":\"\").\"]\"}\ [format=%{&ff}]\ [pos=%l,%v][%p%%]\ [len=%L]
"状态常显示
set laststatus=2 
"定义tab字符数
set tabstop=4
set shiftwidth=4
set noexpandtab

"set cursorline
set encoding=utf-8

set number
set showmode

"智能换行
set noautoindent
set smartindent
set nocindent

"语法高亮
syntax on

"不用与vi兼容(兼容会造成部分功能不可用)
set nocompatible

"引入Vundle
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

Plugin 'VundleVim/Vundle.vim'
"一些用Vundle管理的插件
"Plugin 'fatih/vim-go'
"Plugin 'http://git.xuchen.wang/yachen/YouCompleteMe'
"Plugin 'http://git.xuchen.wang/yachen/vim-airline'
call vundle#end()
filetype plugin indent on

插件安装方法:

1.把对应注释去了或自己增加

  1. vim内 :PluginInstall
  2. 针对YouCompleteMe

    apt-get install build-essential cmake python-dev python3-dev
    cd ~/.vim/bundle/YouCompleteMe
    ./install.py --clang-completer --go-completer --js-completer --java-completer等等

此处评论已关闭