You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.5 KiB
1.5 KiB
VIM Cheat Sheet
Split
<ctrl-w>sor:spsplit with line running horizontally<ctrl-w>vor:vspsplit with line running verticall<ctrl-w>arrowmove to pane:qclose tab:tab splitmove split to new tab
Buffers
:b[num]use buffer [num]:bnnext buffer:[num]bdunload buffer [num]
Tabs
gtgo to next tabgTgo to next tab[num]gtgo to tab [num]:tabnewopen new tab:tabcclose tab:tabeedit file in new tab
Auto Complete
<ctrl-x><ctrl-o>omni completion<ctrl-y>,emmet<ctrl-]>abbreviations<ctrl-n>word completion
Navigation
<ctrl-f>page down<ctrl-b>page up
Editing
dwdelete forward to end of worddbdelete backward to beginning of wordxdelete current charXdelete previous char:%s/wordtochange/changedvalue/gcsearch/replace
Copying
"+ycopys visual selection to clipboard
Formatting
=auto indent selection/linegg=Gauto indent entire bufferJjoin current line with next line
Comments
\c<space>- Nerdcommentor<ctrl-v>then select block. Then<shift-i>to enter insert. Enter text and hitEsc
Selection
vvisual characterVvisual line<ctrl-v>visual block<option-click>visual block, highlight from start to click point
Commands
:%s/\s\+$//etrim ending whitespace:%retab!convert spaces to tabsNERDTreeopen up nerd tree file explorer
NERDTree
rrefresh tree