Skip to content

Latest commit

 

History

History
95 lines (86 loc) · 3.45 KB

README.md

File metadata and controls

95 lines (86 loc) · 3.45 KB

Prerequisites

Mac OS X EI Capitan

brew install clang-format # format c/c++/java... code
brew install vim
brew install cmake xz # need by YouCompleteMe
brew install ctags
brew install npm
brew install nodejs
npm -g install instant-markdown-d # for vim-instant-markdown
brew install the_silver_searcher # faster code search tool than ack

Ubuntu 16.04 (sudo)

apt install vim-nox # some plugins need python supported
apt install exuberant-ctags
apt install cmake
apt install clang-format
apt install silversearcher-ag
apt install npm xdg-utils curl nodejs-legacy
npm -g install instant-markdown-d

Install and Uninstall

Online installation

sh -c "$(curl -fsSL https://raw.githubusercontent.com/marvelrock/vim-ide-easy-install/master/tools/install.sh)"

Uninstall

rm -rf $HOME/.vim
echo > $HOME/.vimrc

Post install

  • vim-airline - fantastic status line

    You need to select a font from $HOME/.vim/plugged/fonts/ for your terminal's non-ascii font. And keep let g:airline_powerline_fonts = 1 on.

You may need this for your projects(c/c++/python/java...)

cp $HOME/.vim/dotfiles/.ycm_extra_conf.py /path/to/your/project/
  • Clang-Format
clang-format -style=Google -dump-config > /path/to/your/project/.clang-format
cp -r $HOME/.vim/dotfiles/.vimprj /path/to/your/project/

Key mapping

  • F4: toggle tagbar
  • F5: while CtrlP is active, to re-index CtrlP
  • ctrl-p: toggle ctrlp
  • ctrl-f | ctrl-b: switch between ctrlp's tabs
  • ctrl-y: after opening ctrlp, create new file
  • ctrl-o: after opening ctrlp, provide a list ways in which file will be open
  • F6: toggle nerdtree
  • B: while NERDTree is active, to see your bookmarks above the file tree, then type o to open the bookmark
  • F8: switch back and forth between buffers
  • ;[12...90]: jump to specify buffer
  • nw | ;hw | ;jw | ;kw | ;lw:switch between windows
  • ;q: quit vim
  • ;w: save current buffer
  • ;WQ: save all and quit vim
  • ;Q: don't save and force quit
  • ;jc: jump to declaration(YouCompleteMe)
  • ;jd: jump to definition(YouCompleteMe)
  • ;sf: active CtrlSF
  • ;ud: toggle gundo plugin
  • more about mapping, please type :map in vimrc

Note

  • YouCompleteMe only support jump in a translate unit or #include files, but we can use CtrlSF instead to jump between definition and declaration.

References