Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
.vim
.vimrc
.ycm_extra_conf.py
README.md

README.md

Requirements

Your Computer must connect the Internet and be installed Git & Vim.

Key Mapping & Tutorial

Key Mapping & Tutorial (Only Chinese version currently.)

Installation

If ~/.vimrc and ~/.vim/ exist, then backup your original vim config

mv ~/.vimrc ~/.vimrc.old
mv ~/.vim ~/.vim.old

Then do following steps.

  1. Download this repo:
git clone https://github.com/chetui/dotfiles.git
  1. Put files in your home:
mv dotfiles/vim/.vimrc ~  
mv dotfiles/vim/.vim ~  
mv dotfiles/vim/.ycm_extra_conf.py ~  
  1. Download the plugin mamage plugin:
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
  1. Install all the plugins:
vim +BundleInstall +qall 
  1. Fix a bug of WinManager:
vim ~/.vim/bundle/winmanager/plugin/winmanager.vim

add exe 'q' in following position:

     function! <SID>ToggleWindowsManager()
       if IsWinManagerVisible()
          call s:CloseWindowsManager()
       else
          call s:StartWindowsManager()
          exe 'q'   
       end
    endfunction
  1. Install python syntax checker lib:
sudo apt-get install python-pip
sudo pip install flake8
  1. [Optional] Multi-files Search plugin -- CtrlSF:

Configure CtrlSF:
7.1 Install CtrlSF:

vim ~/.vimrc

Uncomment CtrlSF plugin:

Bundle 'dyng/ctrlsf.vim'

...

" Plugin: CtrlSF {
...
" }

Install CtrlSF plugin:

vim +BundleInstall +qall

7.2 Install Ag:
The CtrlSF is based on the Ag. Please follow the official install guide:
Official Install Guide

  1. [Optional] Syntax-based code completion plugin -- YouCompleteMe:

Configure YouCompleteMe:
8.1 Remove neocomplcache plugin:

vim ~/.vimrc

Comment neocomplcache plugin:

"Bundle 'Shougo/neocomplcache'

...


"" Plugin: neocomplcache {
"...
"" }

Remove neocomplcache plugin:

rm -rf ~/.vim/bundle/neocomplcache/

8.2 Install YouCompleteMe plugin:

vim ~/.vimrc

Uncomment YouCompleteMe plugin:

Bundle 'Valloric/YouCompleteMe'

...

" Plugin: YouCompleteMe {
...
" }

Install YouCompleteMe plugin:

vim +BundleInstall +qall

8.3 Configure C/C++ header files paths:

apt-get install clang
echo | clang -std=c++11 -stdlib=libc++ -v -E -x c++ -

Add the output paths after #include <...> search starts here: into ~/.ycm_extra_conf.py. Notice insert '-isystem' before each paths. For example:

flags = [

...

'-isystem',
'/output/path/one',
'-isystem',
'/output/path/two',
]

8.4 YouCompleteMe plugin need to be compiled.
You can follow the Official Install Guide.
It is very easy for Mac OS X and Ubuntu 14.04 to install it. For other Debian-based distro, e.g Ubuntu 12.04, you need to compile and update your Vim first.
Official Install Guide for Mac OS X
Official Install Guide for Ubuntu Linux x64