ln -s vimconfig/vimrc ~/.vimrc
# if you want use neovim, and want it to share config with vim:
ln -s ~/.vim .config/nvim
ln -s ~/.vimrc .config/nvim/init.vim
Exit from insert mode (ESC is disabled by default)
*
(visual mode)Search next for the current selection
*
(normal mode) Keep search pattern at the center of the screen
#
(visual mode) Search previous for the current selection
#
(normal mode) Keep search pattern at the center of the screen
;
Enter command line, same as :
f{char}{char}
Input exact 2 chars, use vim-sneak to go the first occurance of input text
F{char}{char}
Use backward comparing with f
m
Jump to the middle of line
n
(normal mode) Keep search pattern at the center of the screen
N
(normal mode) Keep search pattern at the center of the screen
U
easier redo, same as Ctrl+r
v
expand selection region (Plugin: vim-expand-region)
V
shrink selection region (Plugin: vim-expand-region
w!!
sudo & write a file
Y
Yank everthing from cursor to end of line
yy
Yank the whole line
,q
Quickly close current window, same as :q
,v
Select block
,w
Fast saving, same as :w!
:w!!
Sudo write a file
{Space}
Page down
CTRL+@
Page up
Fn Keys
Key
Function
F2
Toggle Tagbar (Plugin: tagbar)
F3
Do Syntastic check
F4
Toggle Syntastic error window
F5
AutoFormat source code (Plugin: vim-autoformat)
F8
Switch Color Scheme (Plugin: vim-colorscheme-switch)
F10
Quick run current file (plugin: quickrun)
F11
Toggle line number and indent line, useful when you copy screen
F12
Toggle Paste mode
CTRL+?
Key
Function
CTRL+b
Go to the beginning of line (only in INSERT mode)
CTRL+d
Scroll down half a page
CTRL+e
Go to the end of line (only in INSERT mode)
CTRL+f
Prompt in commandline to use CtrlSF to search
CTRL+h
Jump to the previous snippet trigger (Plugin: UltiSnips)
CTRL+i
Retrace you movement in file in forward
CTLR+j
Move down selection or line (Plugin vim-move)
CTLR+k
Move up selection or line (Plugin vim-move)
CTLR+l
Expand the snippet or jump to next snippet trigger (Plugin UltiSnips)
CTRL+m
Select current word and jump to next (Plugin:vim-multiple-cursors)
CTRL+o
Retrace your movement in file in backwards
CTRL+p
Select previous word and jump to previous (Plugin: vim-multiple-cursors)
CTRL+s
Save current file, mapping of :w!
CTRL+t
Open the command-t file window
CTRL+u
Scrool up half a page
CTRL+x
Skip current word (Plugin: vim-multiple-cursors)
CTRL+y
Format source file (plugin: vim-autoformat)
{Leader}?
Key
Function
,b
Open a window listing all buffers (Plugin: buffergator)
,B
Close the buffer catalog (Plugin: buffergator)
,f
Open ctrlp to search file (Plugin: ctrlp)
,n
Toggle NERDTree
,r
Quick run current file (plugin: quickrun)
,s
Replace the current word
,w
Fast saving, same as :w!
,q
Quickly close current window, same as :q
,v
Select block
,z
Toggle line number
` Hotkey
Key
Function
`e
create a new line in the end of file and jump to it
`b
move backward to last cursor position
``
move backward to last cursor position
`f
move foreward to last cursor position
`/
remove hightlight words
Line Movement
Key
Function
,lj
Move current line to above
,lk
Move current line to below
Tab
Key
Function
,te
Open a new tab with the current buffer's path, Super useful when editing files in the same director
,tm
Tab move
,tn
Go to next tab
,to
Tab only
,tp
Go to previous tab
,tq
Close tab
,tt
Create new tab
,1
Go to 1st tab
,2
Go to 2nd tab
,3
Go to 3rd tab
,4
Go to 4th tab
,5
Go to 5th tab
,6
Go to 6th tab
,7
Go to 7th tab
,8
Go to 8th tab
,9
Go to 9th tab
,0
Go to last tab
Window
Key
Function
,wh
Go to left window
,wj
Go to above window
,wk
Go to below window
,wl
Go to right window
,wq
Close window
,ww
Switch to next window
,wz
Toggle zoom current window
Buffer
Key
Function
,b
Open a window listing all buffers (Plugin: buffergator)
,B
Close the buffer catalog (Plugin: buffergator)
,bb
Create new buffer
,bn
Go to next buffer
,bp
Go to previous buffer
Misc
Key
Function
,~m
Remove the windows ^M when the encoding gets messed up
gV
Hight last inserted text
,rc
Replace the current word and all its occurrences
Clipboard Related KeyMapping
After enable the vim-easyclip plugin, a lot clipboard related functionality will be modified, below is the command list and their corresponding function:
Key
Function
d
Delete over the given motion and do not change clipboard
dd
Delete the line and do not change clipboard
D
Delete from cursor to the end of the line and do not change clipboard
dD
Delete the contents of line except the newline character (that is, make it blank) and do not change clipboard
x
Delete the character under cursor and do not change clipboard
s
- Delete the character under cursor then enter insert mode and do not change clipboard
S
Delete the line under cursor then enter insert mode and do not change clipboard
c
Enter insert mode over top the given area and do not change clipboard
cc
Enter insert mode over top the current line and do not change clipboard
C
Enter insert mode from cursor to the end of the line and do not change clipboard
p
Paste from specified register. Inserts after current line if text is multiline, after current character if text is non-multiline. Leaves cursor at end of pasted text.
P
Same as p except inserts text before current line/character
p
Same as p except does not auto-format text. This is only relevant if the auto-format option is enabled
P
Same as P except does not auto-format text. This is only relevant if the auto-format option is enabled
gp
Same as p but preserves the current cursor position
gP
Same as P but preserves the current cursor position
gP
Same as P but preserves the current cursor position
gp
Same as p but preserves the current cursor position
m
Delete over the given motion and copy text to clipboard
mm
Delete the current line and copy text to clipboard
<CTRL-P>
Rotate the previous paste forward in yank buffer. Note that this binding will only work if executed immediately after a paste
<CTRL-N>
Rotate the previous paste backward in yank buffer. Note that this binding will only work if executed immediately after a paste
[y
Go backward in the yank buffer. This can be executed at any time to modify order of yanks in the yank buffer (though I would recommend just using instead)
]y
Go forward in the yank buffer. This can be executed at any time to modify order of yanks in the yank buffer (though I would recommend just using instead)
Y
Copy text from cursor position to the end of line to the clipboard
s
Substitute over the given motion with specified register (or default register if unspecified).
ss
Substitute over the current line with specified register (or default register if unspecified).
gs
Same as s but preserves the current cursor position.
open the currently selected buffer in the previous window, but with focus remaining in the buffer catalog ("42go" will do the same, but will select buffer number 42).
{Number}{Enter}
Open buffer number in prevous window, such as 42*{Enter}, 5{Enter}*
A
Toggle zoom in/zoom out the vim-buffergator window
d
Delete the selected buffer
D
Unconditionally delete the selected buffer.
i
open the currently selected buffer in new horizontal split. "42i" will do the same
I
open the buffer in a new vertical split, but keep the focus in the buffer catalog. "42I" will do the same.
q
Quit the index/catalog window.
r
Update (rebuild/refresh) index.
s
Open the currently selected buffer in new vertical split. "42s" will do the same.
S
open the buffer in a new vertical split, but keep the focus in the buffer catalog. "42S" will do the same
t
open the currently selected buffer in new tab ("42t" will do the same, but will select buffer number 42)
x
Wipe the selected buffer.
X
Unconditionally wipe the selected buffer.
{Space} or CTRL+N
Go to the next buffer entry (or, if [count] is given, buffer with number [count]), and preview it in the previous window.
CTRL+{Space} or CTRL+P
Go to the previous buffer entry (or, if [count] is given, buffer with number [count]), and preview it in the previous window.
To support the vim-airline or vim-powerline, the terminal font must be patched. You don't need to patch by yourself, you just need to download and install the patched font from following address: