vim c/c++配置

git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim  
首先添加 Vundle 管理工具
vim 直接用yum 添加就可以了


然后修改家目录下面的  .vimrc文件

下载配色方案

monokai 配色方案 git地址(https://github.com/sickill/vim-monokai) 直接下载对应的monokai.vim 文件 放到 ~/.vim/colors/ 即可


修改 .vimrc 为以下内容

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'mileszs/ack.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'tyok/nerdtree-ack'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'tpope/vim-rails'
Plugin 'drmingdrmer/xptemplate'
" Begin Snippet
Plugin 'MarcWeber/vim-addon-mw-utils'
Plugin 'tomtom/tlib_vim'
Plugin 'garbas/vim-snipmate'
Plugin 'honza/vim-snippets'
Plugin 'altercation/vim-colors-solarized'
" End Snippet
"Plugin 'Valloric/YouCompleteMe'
Bundle 'Valloric/YouCompleteMe'
" Plugin 'majutsushi/tagbar'
call vundle#end()            " required

set nocompatible              " be iMproved, required
set backspace=2 
set encoding=utf-8
set fileencoding=utf-8
set number
set autoindent
set smartindent
set tabstop=4
set autochdir
set shiftwidth=4
syntax enable
colorscheme monokai

let g:tagbar_width = 30
nmap  :NERDTreeToggle
nmap  :TagbarToggle
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 3 && !exists("s:std_in") | NERDTree | endif



输入

:PluginInstall 安装完对应的插件即可

你可能感兴趣的:(mac,linux/centos,C/C++)