Vim References
A reference guide for commands I find myself forgetting and searching for constantly.
General Shortcuts
<C-[>
Shorthand for escape. Never leave the home row.<C-g>
Display status bar with filename
Windows and Tabs
:tabe {file}
Opens file in new tab.:tabo {file}
Closes all other open tabs.<C-gf>
Opens the file under the cursor in a tab.gt
ORgT
Move to next or previous tab.:vs
or:split
Split the screen horizontally.:vsp
or:vsplit
Split the screen vertically.<C-[hjkl]>
Move cursor in direction to screen split
Text Editing and Movement
vip
Visual select of paragraphgq
Smart Reflow selected text=
Smart Reindent visual selected text=G
Smart Reindent from cursor to end of filez.
orzz
Center the screen on the cursor.
Spelling and Editing
]s
or[s
Jump to next misspelled wordz=
Check spelling of word under cursorzg
Add word under cursor to dictionary
NerdTree
Requires NerdTree plugin
<C-n>
Enables NerdTree.t
opens up file in new tab
NerdCommenter
Requires NerdCommenter plugin
<leader>c<space>
Toggles current line comment<leader>cA
Adds comment to end of current line