1. 下载Vundle源文件
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
2. 编辑插件配置文件
使用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()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'git://git.wincent.com/command-t.git'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
call vundle#end() " required
filetype plugin indent on " required
3. 安装VIM插件
方法一:
在VIM下运行 :PluginInstall
方法二:
在shell下运行 vim PluginInstall qall
等待插件安装完成
4. 安装构建工具
ubuntu 16.04
sudo apt-get install build-essential cmake
ubuntu 14.04
sudo apt-get install build-essential cmake3
4. 以git方式安装YouCompleteMe
支持C-family languages
git clone https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe/
./install.py --clang-completer
不支持C-family languages
git clone https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe/
./install.py
运行./install.py
的时候会提示sudo git submodule update --init --recursive
运行此命令,待依赖都下载完成,就安装成功了,打开IDE看看自动联想/缩进等等功能都有了