-
Get configuration:
$ git clone https://github.com/JokerShao/vimrc.git $ cp vimrc/.vimrc ~/.vimrc
-
Install Vundle && Let Vundle manage Plugin
- Make your own vim directories like this:
~/: .vimrc .vim/ .vim/: bundle/
- Install Vundle
$ cd ~/.vim/bundle/ $ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
-
Launch
vim
and run:PluginInstall
You need to configure this following plugins individually.
- YCM
- YouCompleteMe: a code-completion engine for Vim
- powerline
- Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, fish, tmux, IPython, Awesome, i3 and Qtile.
- cscope
- Cscove(new name for this plugin, since cscope.vim is used too widely.) is a smart cscope helper for vim.
- ctrlsf
sudo apt install ack-grep
sudo apt install silversearcher-ag
- ctags
sudo apt install ctags
F1.Terminal help
F2.NERDTree
F3.Tagbar
F4.Gundo
F5.Markdown-preview
-
Create .ycm_extra_conf.py Depends on Makefile
Launch `vim` in project root directories and run `:YcmGenerateconfig` to create a `.ycm_extra_conf.py` so YCM can complete your project's function and class.
-
Create cscope database(show more details) In project root directories
$ find `pwd` -name "*.c" -o -name "*.cpp" -o -name "*.hpp" -o -name "*.h" > cscope.files $ cscope -Rbq
-
Create ctags file
modify ~/.indexer_files like this: --------------- ~/.indexer_files --------------- [foo] /data/workplace/foo/src/ [bar] /data/workplace/bar/src/
Change the original file.
# These are the compilation flags that will be used in case there's no
# compilation database set (by default, one is not set).
# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR.
flags = [
'-Wall',
'-Wextra',
#'-Werror', # comment this to make the distinction between error and warning
'-fexceptions',
'-DNDEBUG',