安装 Vundle

官方地址: Vundle

下载 Vundle 到本地:

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

Vundle设定以及插件设定:
vim ~/.vimrc, 填入以下内容:

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" Your plugins here
Plugin 'git@github.com:kien/ctrlp.vim.git'
Plugin 'scrooloose/nerdtree'
Plugin 'Valloric/YouCompleteMe'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required

安装插件:

启动 vim 输入 :PluginInstall 或者
命令行启动: vim +PluginInstall +qall

安装 YouCompleteMe (YCM)

更新以及安装:

cd .vim/bundle/YouCompleteMe/
git submodule update --init --recursive # 可能需要使用代理加快访问速度
./install.py

Linux 使用 SS 代理: http://imlane.zhanglintc.co/linux-ss-ke-hu-duan

可能会遇到的问题:

# 没有 cmake
sudo yum install cmake -y

# 提示不是C++ 11
sudo yum install gcc-c++ -y

# 找不到 Python.h
sudo yum install python-devel -y

NERDTree 相关

vim ~/.vimrc

# add this
map <F3> :NERDTreeMirror<CR>
map <F3> :NERDTreeToggle<CR>
Comments
Write a Comment