All of these works on VS Code flavored Vim which is amaze.
Opening, Saving and Closing Files:
:e filename - Open filename:w - Save the current file:wq or :x - Save and quit:q - Quit:q! - Quit without savingNavigation:
h - Move leftj - Move downk - Move upl - Move rightw - Move to the start of the next wordb - Move to the start of the previous word0 - Move to the start of the line$ - Move to the end of the linegg - Move to the first lineG - Move to the last lineEditing:
i - Insert modea - Append modeo - Open a new line below the current lineO - Open a new line above the current lineu - UndoCtrl + r - RedoCutting, Copying and Pasting:
dd - Delete (cut) a lineyy - Yank (copy) a linep - Paste below the cursorP - Paste above the cursorSearching:
/pattern - Search for patternn - Find next occurrenceN - Find previous occurrence:%s/old/new/g - Replace all occurrences of old with newSplit Windows:
:sp filename - Split window and open filename:vsp filename - Split window vertically and open filenameCtrl + w followed by an arrow key - Move between split windowsCode Navigation:
gd - Go to definitionCtrl + o - Move back to previous locationCtrl + i - Move forward to the next location