basicsbufferschangescursor horizontalcursor verticalcut and pasteeditingfoldsinsert modejumpsmacrosmarkspagingregistersvisual modewindows BasicsCommandModeDescription:helpexOpen a help window:quitexQuit current window (when one window quit vim):wqexWrite to a file and quit window or vim:writeexWrite to a fileBuffersCommandModeDescription:bdeleteexRemove a buffer from the buffer list:bnextexGo to next buffer in the buffer list:bpreviousexGo to previous buffer in the buffer list:lsexList all buffersChangesCommandModeDescription:changesexPrint the change list[n] g,nGo to n newer position in change list[n] g;nGo to n older position in change listCursor HorizontalCommandModeDescription[n] $nCursor to the end of nth next line0nCursor to the first char of the line[n] BnCursor n words backward[n] EnCursor forward to the end of word n[n] WnCursor n words forward^nCursor to the first char of the line[n] bnCursor n words backward[n] enCursor forward to the end of word ng_nCursor to the last char n - 1 lines lower[n] hnCursor n chars to the left[n] lnCursor n chars to the right[n] wnCursor n words forwardCursor VerticalCommandModeDescription[n] GnCursor to line n, default last line[n] HnCursor to line n from top of screen[n] LnCursor to line n from bottom of screenMnCursor to middle line of screen[n] ggnCursor to line n, default first line[n] jnCursor n lines downward[n] knCursor n lines upwardCut And PasteCommandModeDescription[n] DnDelete the characters under the cursor until the end of the line and n-1 more lines [into register x]; synonym for "d$"[n] PnPaste before the cursor[n] YnYank to end of current lined$nDelete to end of current line[n] ddnDelete the current linediwnDelete inner word[n] pnPut the text [from register x] after the cursor n times[n] xnDelete n characters under and after the cursor [into register x]y$nYank to end of current lineyiwnYank inner word[n] yynYank the current lineEditingCommandModeDescriptionJnJoin n lines; default is 2RnEnter replace mode: overtype existing characters, repeat the entered text n-1 timesgJnJoin lines without inserting spacegwipnReflow the current paragraph[n] r{char}nReplace n chars with {char}unUndo changesFoldsCommandModeDescriptionzCnClose folds recursivelyzOnOpen folds recursivelyzRnSet 'foldlevel' to the deepest foldzanOpen a closed fold, close an open foldzcnClose a foldzmnSubtract one from 'foldlevel'zonOpen foldzrnAdd one to 'foldlevel'Insert ModeCommandModeDescription[n] AnAppend text after the end of the line n times[n] CnChange from the cursor position to the end of the line, and n-1 more lines [into register x]; synonym for "c$"[n] InInsert text before the first char on the line n times[n] OnBegin a new line above the cursor and insert text, repeat n times[n] SnDelete n lines [into register x] and start insert; synonym for "cc".[n] anAppend text after the cursor n timesc$nDelete from the cursor position to the end of the line, and enter insert mode[n] ccnDelete the current line then enter insert modecenDelete from the cursor position to the end of the current word, and enter insert modeciwnDelete the current inner-word, and enter insert modecwnDelete from the cursor position to the end of the current word, and enter insert mode[n] inInsert text before the cursor n times[n] onBegin a new line below the cursor and insert text, repeat n times[n] sn(substitute) delete n characters [into register x] and start insertJumpsCommandModeDescription:jumpsexPrint the jump listC-InSame as <tab>C-OnJump one step backward within jump list`"nGo the position of the most recent edit prior to saving this file``nCursor to the position before latest jumpMacrosCommandModeDescription[n] @@nRepeat the previous @{a-z} n times[n] @{a-z}nExecute the contents of register {a-z} n timesqn(while recording) stops recordingq{0-9a-zA-Z"}nRecord typed characters into named register {0-9a-za-z"} (uppercase to append)MarksCommandModeDescription'xnJump to the start of the line containing mark x:marksexList all marks`xnJump to mark xPagingCommandModeDescriptionC-BnMove screen up one pageC-DnMove cursor down one-half pageC-FnMove screen down one pageC-UnMove cursor up one-half pageRegistersCommandModeDescription:registersexDisplay the contents of registerspnPut the text [from register x] after the cursor n timesynYank operatorVisual ModeCommandModeDescriptionEscvReturn to normal modeOvMove horizontally to other corner of areaaBvExtend highlighted area with a {} blockabvExtend highlighted area with a () blockatvExtend highlighted area with a tag blockawvExtend highlighted area with "a word"iBvExtend highlighted area with inner {} blockibvExtend highlighted area with inner () blockitvExtend highlighted area with inner tag blockovMove cursor to other corner of areaWindowsCommandModeDescription[n] C-W hnGo to nth left window (stop at first window)[n] C-W jnGo n windows down (stop at last window)[n] C-W knGo n windows up (stop at first window)[n] C-W lnGo to nth right window (stop at last window)[n] C-W snSplit current window in two parts, new window n lines high[n] C-W vnSplit current window vertically, new window n columns wide[n] C-W xnExchange current window with window n (default: next window)