Skip to content

Instantly share code, notes, and snippets.

@magic003
Last active April 5, 2016 05:43
Show Gist options
  • Save magic003/9967778 to your computer and use it in GitHub Desktop.
Save magic003/9967778 to your computer and use it in GitHub Desktop.
Vim Cheat Sheet

Vim Cheat Sheet

Navigation

* Search the current word
% Jump to its matching {[(
w Move to next word
e Move to the end of the word
b Move back to the beginning of the word

Edit

cw Change word
Ctrl-n Keyword completion

netrw

% Create a new file
d Create a new directory
R Rename the file/directory
D Delete the file/directory
:Te Open explorer in a new tab

MiniBufExpl

Command My mapping Usage
:MBEFocus <leader>f Focus to MiniBufExpl window
:MBEbn <leader>bn Move to next buffer
:MBEbp <leader>bp Move to previous buffer
:MBEbd <leader>bd Delete the current buffer
:CtrlPTag <leader>. Search in tags
:TagbarToggle <leader>o Open tagbar window

ctrlp

Ctrl-p Find file
Ctrl-r Switch to regexp mode
Ctrl-j, Ctrl-k Navigate the result list
Ctrl-v, Ctrl-x To open the selected entry in a split window
Ctrl-t To open the selected entry in a new tab

tab

:tabnew Create a new tab
gt Move to next tab
ngt Move to the nth tab

CTag

Ctrl-] Go the function definition
Ctrl-t Go back to function call
:ta [function_name] Go to function
:ts List tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment