It has the following features:
- based on the basic configuration of amix/vimrc
- selectively choose some plugins of amix/vimrc
- equiped with dracula theme
- Remove your vim first and
git clone https://github.com/pengsida/.vim.git
. - Install
vim-gnome
to support clipboard. pip install yapf
to support vim-autoformat.
You could arm this vim with YouCompleteMe through the commands:
cd ~/.vim/bundle
git clone --recursive https://github.com/Valloric/YouCompleteMe.git
cd YouCompleteMe
./install.py --clang-completer
You need revise ycm server python interpreter manually in ".vimrc", which should be the one you used to compile ycm.
Once you install YouCompleteMe, you will find that <Tab>
does not trigger SnipMate any more, because a key mapping in YouCompleteMe blocks its function. To repair SnipMate, we can simply comment two lines of codes in "./bundle/YouCompleteMe/autoload/youcompleteme.vim":
for key in g:ycm_key_list_select_completion
" With this command, when the completion window is visible, the tab key
" (default) will select the next candidate in the window. In vim, this also
" changes the typed-in text to that of the candidate completion.
" exe 'inoremap <expr>' . key .
" \ ' pumvisible() ? "\<C-n>" : "\' . key .'"'
endfor
To use ack, you might need to install ack-grep for ubuntu:
sudo apt-get install ack-grep
To use vim-autoformat, you need to install yapf:
pip install yapf
Choose the latex compiler in ~/.vim/bundle/vim-latex/ftplugin/latex-suite
:
TexLet g:Tex_CompileRule_pdf = 'pdflatex -synctex=1 -interaction=nonstopmode -file-line-error-style $*'
- CtrlP
- List all files under current directory:
<ctrl-f>
- List all files under designated directory:
<leader>j
- List history opened files:
<ctrl-b>
- List all files under current directory:
- NerdTree
- Toggle a sidebar listing project files:
<leader>nn
- Open a sidebar and place the cursor on the current filename:
<leader>nf
- Toggle a sidebar listing project files:
- YouCompleteMe
- Jump to the definition or declaration:
<leader>jd
- Jump to the definition or declaration:
- GitFugitive
- Git diff between current change and previous commit:
:Gvdiff
- Show all changes:
:Greview
- Git diff between current change and previous commit:
- vim-snippets
- Global snippets:
vim_runtime/sources_non_forked/vim-snippets/snippets/_.snippts
- Global snippets:
- vim-autoformat
- Format the code:
:Yapf
- Format the code:
- markdown-preview.vim
- Open markdown preview window:
F8
- Close markdown preview window:
F9
- Open markdown preview window:
<leader>
is,
.- Open a new tab:
<leader>tn
or<ctrl-n>
. - Switch between tabs:
J
andK
, which means left switch and right switch, respectively. - Find a specific text:
<space>
. - Move to the beginning and the end of the line:
H
andL
. - Copy the text to the system clipboard:
<ctrl-y>
. - Annotate a line:
<ctrl-g>
. - Reload a file:
:e
. - Discard local changes and reload the file:
:e!
.