.. _vim: VIM === Include: 1. vundle.vim/pathogen.vim 2. basic.vim 3. header.vim 4. script.vim Install ------- Install vim:: sudo apt-get install vim sudo yum install vim Use vundle to manage plugins(recommend):: echo "source ~/dotfiles/etc/vim/vundle.vim" > ~/.vimrc rm -rf ~/.vim mkdir -p ~/.vim/plugins git clone https://github.com/VundleVim/Vundle.vim ~/.vim/plugins/ vim +PluginInstall +qall # run this on shell command line :PluginInstall # or run this in vim command line source ~/.vimrc Use pathogen to manage plugins:: echo "source ~/dotfiles/etc/vim/pathogen.vim" > ~/.vimrc rm -rf ~/.vim/bundle mkdir -p ~/.vim/bundle git clone ~/.vim/bundle/ source ~/.vimrc How to use ---------- Vim font and color theme, need to set the terminator work with the same theme. Vim inner hotkey:: za - opne/create current fold zi - open/create all fold Hotkey in vim:: - \ default is \ in vim. Ctrl+z - Save file Shift+z - Open stardict F1 - VIM help, default F2 - Open/Close Winmanager F3 - Open/Close NERDTree F4 - Open/Close Tagbar F5 - Open/Close Minibufexplorer F6 - Open/Close gundo F10 - Use calendar F11 - Full screen the terminal, default F12 - Open Browser for markdown file CtrlP:: p - find file in current and sub folder. f - find file in MRU. c - clear MRU cache. YCM:: ya - force compile And diagnostics yb - goto definition yc - goto declaration yd - goto definition else declaration ye - detailed djagnostics Ultisnips+vim-snippets:: - expand trigger - jump forward trigger - jump backward trigger For C/C++:: F7 - For C/C++ run make clean. F8 - For C/C++ close quickfix windows. F9 - For C/C++ run make. For Java:: F7 - To add all missing imports. F8 - To remove all missing imports. F9 - For java run javac and java. For Python:: F7 - run autopep8 by pymode. F8 - run 'pyflakes', 'pep8', 'mccabe', 'pep257' by pymode. F9 - run script by pymode. b - create breakpoint by pymode. k - show pydoc by jedi d - goto definition by jedi g - goto assignment by jedi r - rename by jedi n - show usage of a name by jedi For html/css:: , - insert html:5 to trigger emmet for html/css - tag or tag#name to trigger sparkup for html