Movatterモバイル変換


[0]ホーム

URL:


Index

Nvim:help pages,generated fromsource using thetree-sitter-vimdoc parser.


This file contains a list of all commands for each mode, with a tag and ashort description. The lists are sorted on ASCII value.
Tip: When looking for certain functionality, use a search command. E.g.,to look for deleting something, use: "/delete".
For an overview of options seeoption-list.For an overview of built-in functions seefunctions.For a list of Vim variables seevim-variable.

1. Insert modeinsert-index

TagCharInsert-mode action
------------------------------------------------------------------------------
i_CTRL-@CTRL-@insert previously inserted text and stopinserti_CTRL-ACTRL-Ainsert previously inserted texti_CTRL-CCTRL-Cquit insert mode, without checking forabbreviationi_CTRL-DCTRL-Ddelete one shiftwidth of indent in the currentlinei_CTRL-ECTRL-Einsert the character which is below the cursorCTRL-Fnot used (but by default it's in'cinkeys' tore-indent the current line)i_CTRL-G_jCTRL-GCTRL-Jline down, to column where inserting startedi_CTRL-G_jCTRL-G jline down, to column where inserting startedi_CTRL-G_jCTRL-G<Down>line down, to column where inserting startedi_CTRL-G_kCTRL-GCTRL-Kline up, to column where inserting startedi_CTRL-G_kCTRL-G kline up, to column where inserting startedi_CTRL-G_kCTRL-G<Up>line up, to column where inserting startedi_CTRL-G_uCTRL-G ustart new undoable editi_CTRL-G_UCTRL-G Udon't break undo with next cursor movementi_<BS><BS>delete character before the cursori_digraph{char1}<BS>{char2}enter digraph (only when'digraph' option set)i_CTRL-HCTRL-Hsame as<BS>i_<Tab><Tab>insert a<Tab> characteri_CTRL-ICTRL-Isame as<Tab>i_<NL><NL>same as<CR>i_CTRL-JCTRL-Jsame as<CR>i_CTRL-KCTRL-K{char1}{char2}enter digraphi_<CR><CR>begin new linei_CTRL-MCTRL-Msame as<CR>i_CTRL-NCTRL-Nfind next match for keyword in front of thecursori_CTRL-OCTRL-Oexecute a single command and return to insertmodei_CTRL-PCTRL-Pfind previous match for keyword in front ofthe cursori_CTRL-QCTRL-Qsame asCTRL-V, unless used for terminalcontrol flowi_CTRL-SHIFT-QCTRL-SHIFT-Q{char}likeCTRL-Q unlesstui-modifyOtherKeys is activei_CTRL-RCTRL-R{register}insert the contents of a registeri_CTRL-R_CTRL-RCTRL-RCTRL-R{register}insert the contents of a register literallyi_CTRL-R_CTRL-OCTRL-RCTRL-O{register}insert the contents of a register literallyand don't auto-indenti_CTRL-R_CTRL-PCTRL-RCTRL-P{register}insert the contents of a register literallyand fix indent.CTRL-Snot used or used for terminal control flowi_CTRL-TCTRL-Tinsert one shiftwidth of indent in currentlinei_CTRL-UCTRL-Udelete all entered characters in the currentlinei_CTRL-VCTRL-V{char}insert next non-digit literallyi_CTRL-SHIFT-VCTRL-SHIFT-V{char}likeCTRL-V unlesstui-modifyOtherKeys is activei_CTRL-V_digitCTRL-V{number} insert three digit decimal number as a singlebyte.i_CTRL-WCTRL-Wdelete word before the cursori_CTRL-XCTRL-X{mode}enterCTRL-X sub mode, seei_CTRL-X_indexi_CTRL-YCTRL-Yinsert the character which is above the cursori_<Esc><Esc>end insert modei_CTRL-[CTRL-[same as<Esc>i_CTRL-\_CTRL-NCTRL-\CTRL-Ngo to Normal modei_CTRL-\_CTRL-GCTRL-\CTRL-Ggo to Normal modeCTRL-\ a - zreserved for extensionsCTRL-\ othersnot usedi_CTRL-]CTRL-]trigger abbreviationi_CTRL-^CTRL-^toggle use of:lmap mappingsi_CTRL-_CTRL-_When'allowrevins' set: toggle'revins'
<Space> to '~'not used, except '0' and '^' followed byCTRL-D
i_0_CTRL-D 0CTRL-Ddelete all indent in the current linei_^_CTRL-D ^CTRL-Ddelete all indent in the current line, restoreit in the next line
i_<Del><Del>delete character under the cursor
Meta characters (0x80 to 0xff, 128 to 255)not used
i_<Left><Left>cursor one character lefti_<S-Left><S-Left>cursor one word lefti_<C-Left><C-Left>cursor one word lefti_<Right><Right>cursor one character righti_<S-Right><S-Right>cursor one word righti_<C-Right><C-Right>cursor one word righti_<Up><Up>cursor one line upi_<S-Up><S-Up>same as<PageUp>i_<Down><Down>cursor one line downi_<S-Down><S-Down>same as<PageDown>i_<Home><Home>cursor to start of linei_<C-Home><C-Home>cursor to start of filei_<End><End>cursor past end of linei_<C-End><C-End>cursor past end of filei_<PageUp><PageUp>one screenful backwardi_<PageDown><PageDown>one screenful forwardi_<F1><F1>same as<Help>i_<Help><Help>stop insert mode and display help windowi_<Insert><Insert>toggle Insert/Replace modei_<LeftMouse><LeftMouse>cursor at mouse clicki_<ScrollWheelDown><ScrollWheelDown>move window three lines downi_<S-ScrollWheelDown><S-ScrollWheelDown>move window one page downi_<ScrollWheelUp><ScrollWheelUp>move window three lines upi_<S-ScrollWheelUp><S-ScrollWheelUp>move window one page upi_<ScrollWheelLeft><ScrollWheelLeft>move window six columns lefti_<S-ScrollWheelLeft><S-ScrollWheelLeft>move window one page lefti_<ScrollWheelRight><ScrollWheelRight>move window six columns righti_<S-ScrollWheelRight><S-ScrollWheelRight>move window one page right
commands inCTRL-X submodei_CTRL-X_index
i_CTRL-X_CTRL-DCTRL-XCTRL-Dcomplete defined identifiersi_CTRL-X_CTRL-ECTRL-XCTRL-Escroll upi_CTRL-X_CTRL-FCTRL-XCTRL-Fcomplete file namesi_CTRL-X_CTRL-ICTRL-XCTRL-Icomplete identifiersi_CTRL-X_CTRL-KCTRL-XCTRL-Kcomplete identifiers from dictionaryi_CTRL-X_CTRL-LCTRL-XCTRL-Lcomplete whole linesi_CTRL-X_CTRL-NCTRL-XCTRL-Nnext completioni_CTRL-X_CTRL-OCTRL-XCTRL-Oomni completioni_CTRL-X_CTRL-PCTRL-XCTRL-Pprevious completioni_CTRL-X_CTRL-RCTRL-XCTRL-Rcomplete contents from registersi_CTRL-X_CTRL-SCTRL-XCTRL-Sspelling suggestionsi_CTRL-X_CTRL-TCTRL-XCTRL-Tcomplete identifiers from thesaurusi_CTRL-X_CTRL-YCTRL-XCTRL-Yscroll downi_CTRL-X_CTRL-UCTRL-XCTRL-Ucomplete with'completefunc'i_CTRL-X_CTRL-VCTRL-XCTRL-Vcomplete like in : command linei_CTRL-X_CTRL-ZCTRL-XCTRL-Zstop completion, text is unchangedi_CTRL-X_CTRL-]CTRL-XCTRL-]complete tagsi_CTRL-X_sCTRL-X sspelling suggestions
commands in completion mode (seepopupmenu-keys)
complete_CTRL-ECTRL-Estop completion and go back to original textcomplete_CTRL-YCTRL-Yaccept selected match and stop completionCTRL-Linsert one character from the current match<CR>insert currently selected match<BS>delete one character and redo searchCTRL-Hsame as<BS><Up>select the previous match<Down>select the next match<PageUp>select a match several entries back<PageDown>select a match several entries forwardotherstop completion and insert the typed character

2. Normal modenormal-index

CHAR any non-blank characterWORD a sequence of non-blank charactersN a number entered before the command{motion} a cursor movement commandNmove the text that is moved over with a{motion}SECTION a section that possibly starts with '}' instead of '{'
note: 1 = cursor movement command; 2 = can be undone/redone
TagChar Note Normal-mode action
------------------------------------------------------------------------------
CTRL-@ not usedCTRL-ACTRL-A2 add N to number at/after cursorCTRL-BCTRL-B1 scroll N screens BackwardsCTRL-CCTRL-C interrupt current (search) commandCTRL-DCTRL-D scroll Down N lines (default: half a screen)CTRL-ECTRL-E scroll N lines upwards (N lines Extra)CTRL-FCTRL-F1 scroll N screens ForwardCTRL-GCTRL-G display current file name and position<BS><BS>1 same as "h"CTRL-HCTRL-H1 same as "h"<Tab><Tab>1 go to N newer entry in jump listCTRL-ICTRL-I1 same as<Tab><NL><NL>1 same as "j"<S-NL><S-NL>1 same asCTRL-FCTRL-JCTRL-J1 same as "j"CTRL-K not usedCTRL-LCTRL-L redraw screen<CR><CR>1 cursor to the first CHAR N lines lower<S-CR><S-CR>1 same asCTRL-FCTRL-MCTRL-M1 same as<CR>CTRL-NCTRL-N1 same as "j"CTRL-OCTRL-O1 go to N older entry in jump listCTRL-PCTRL-P1 same as "k"CTRL-Q not used, or used for terminal control flowCTRL-RCTRL-R2 redo changes which were undone with 'u'CTRL-S not used, or used for terminal control flowCTRL-TCTRL-T jump to N older Tag in tag listCTRL-UCTRL-U scroll N lines Upwards (default: half a screen)CTRL-VCTRL-V start blockwise Visual modeCTRL-WCTRL-W{char} window commands, seeCTRL-WCTRL-XCTRL-X2 subtract N from number at/after cursorCTRL-YCTRL-Y scroll N lines downwardsCTRL-ZCTRL-Z suspend program (or start new shell)CTRL-[<Esc> not usedCTRL-\_CTRL-NCTRL-\CTRL-N go to Normal mode (no-op)CTRL-\_CTRL-GCTRL-\CTRL-G go to Normal mode (no-op)CTRL-\ a - z reserved for extensionsCTRL-\ others not usedCTRL-]CTRL-] :ta to ident under cursorCTRL-^CTRL-^ edit Nth alternate file (equivalent to ":e #N")CTRL-<Tab>CTRL-<Tab> same asg<Tab> : go to last accessed tab pageCTRL-_ not used
<Space><Space>1 same as "l"! !{motion}{filter}2 filter Nmove text through the{filter} command!! !!{filter}2 filter N lines through the{filter} commandquote "{register} use{register} for next delete, yank or put ({.%#:} only work with put)# #1 search backward for the Nth occurrence of the ident under the cursor$ $1 cursor to the end of Nth next line% %1 find the next (curly/square) bracket on this line and go to its match, or go to matching comment bracket, or go to matching preprocessor directive.N%{count}%1 go to N percentage in the file& &2 repeat last :s' '{a-zA-Z0-9}1 cursor to the first CHAR on the line with mark{a-zA-Z0-9}'' ''1 cursor to the first CHAR of the line where the cursor was before the latest jump.'( '(1 cursor to the first CHAR on the line of the start of the current sentence') ')1 cursor to the first CHAR on the line of the end of the current sentence'< '<1 cursor to the first CHAR of the line where highlighted area starts/started in the current buffer.'> '>1 cursor to the first CHAR of the line where highlighted area ends/ended in the current buffer.'[ '[1 cursor to the first CHAR on the line of the start of last operated text or start of put text'] ']1 cursor to the first CHAR on the line of the end of last operated text or end of put text'{ '{1 cursor to the first CHAR on the line of the start of the current paragraph'} '}1 cursor to the first CHAR on the line of the end of the current paragraph( (1 cursor N sentences backward) )1 cursor N sentences forwardstar *1 search forward for the Nth occurrence of the ident under the cursor+ +1 same as<CR><S-Plus><S-+>1 same asCTRL-F, ,1 repeat latest f, t, F or T in opposite direction N times- -1 cursor to the first CHAR N lines higher<S-Minus><S-->1 same asCTRL-B. .2 repeat last change with count replaced with N/ /{pattern}<CR>1 search forward for the Nth occurrence of{pattern}/<CR> /<CR>1 search forward for{pattern} of last search0 01 cursor to the first char of the linecount 1 prepend to command to give a countcount 2"count 3"count 4"count 5"count 6"count 7"count 8"count 9": :1 start entering an Ex commandN:{count}: start entering an Ex command with range from current line to N-1 lines down; ;1 repeat latest f, t, F or T N times< <{motion}2 shift Nmove lines one'shiftwidth' leftwards<< <<2 shift N lines one'shiftwidth' leftwards= ={motion}2 filter Nmove lines through "indent"== ==2 filter N lines through "indent"> >{motion}2 shift Nmove lines one'shiftwidth' rightwards>> >>2 shift N lines one'shiftwidth' rightwards? ?{pattern}<CR>1 search backward for the Nth previous occurrence of{pattern}?<CR> ?<CR>1 search backward for{pattern} of last search@ @{a-z}2 execute the contents of register{a-z} N times@: @: repeat the previous ":" command N times@@ @@2 repeat the previous @{a-z} N timesA A2 append text after the end of the line N timesB B1 cursor N WORDS backwardC ["x]C2 change from the cursor position to the end of the line, and N-1 more lines [into register x]; synonym for "c$"D ["x]D2 delete the characters under the cursor until the end of the line and N-1 more lines [into register x]; synonym for "d$"E E1 cursor forward to the end of WORD NF F{char}1 cursor to the Nth occurrence of{char} to the leftG G1 cursor to line N, default last lineH H1 cursor to line N from top of screenI I2 insert text before the first CHAR on the line N timesJ J2 Join N lines; default is 2K K lookup Keyword under the cursor with'keywordprg'L L1 cursor to line N from bottom of screenM M1 cursor to middle line of screenN N1 repeat the latest '/' or '?' N times in opposite directionO O2 begin a new line above the cursor and insert text, repeat N timesP ["x]P2 put the text [from register x] before the cursor N timesR R2 enter replace mode: overtype existing characters, repeat the entered text N-1 timesS ["x]S2 delete N lines [into register x] and start insert; synonym for "cc".T T{char}1 cursor till after Nth occurrence of{char} to the leftU U2 undo all latest changes on one lineV V start linewise Visual modeW W1 cursor N WORDS forwardX ["x]X2 delete N characters before the cursor [into register x]Y ["x]Y yank N lines [into register x]; synonym for "yy" Note: Mapped to "y$" by default.default-mappingsZZ ZZ write if buffer changed and close windowZQ ZQ close window without writing[ [{char} square bracket command (see[ below)\ not used] ]{char} square bracket command (see] below)^ ^1 cursor to the first CHAR of the line_ _1 cursor to the first CHAR N - 1 lines lower` {a-zA-Z0-9}1 cursor to the mark {a-zA-Z0-9}`( (1 cursor to the start of the current sentence`) )1 cursor to the end of the current sentence`< <1 cursor to the start of the highlighted area`> >1 cursor to the end of the highlighted area`[ [1 cursor to the start of last operated text or start of putted text`] ]1 cursor to the end of last operated text or end of putted text`` "``"1 cursor to the position before latest jump`{ {1 cursor to the start of the current paragraph`} }1 cursor to the end of the current paragrapha a2 append text after the cursor N timesb b1 cursor N words backwardc ["x]c{motion}2 delete Nmove text [into register x] and start insertcc ["x]cc2 delete N lines [into register x] and start insertd ["x]d{motion}2 delete Nmove text [into register x]dd ["x]dd2 delete N lines [into register x]do do2 same as ":diffget"dp dp2 same as ":diffput"e e1 cursor forward to the end of word Nf f{char}1 cursor to Nth occurrence of{char} to the rightg g{char} extended commands, seeg belowh h1 cursor N chars to the lefti i2 insert text before the cursor N timesj j1 cursor N lines downwardk k1 cursor N lines upwardl l1 cursor N chars to the rightm m{A-Za-z} set mark{A-Za-z} at cursor positionn n1 repeat the latest '/' or '?' N timeso o2 begin a new line below the cursor and insert text, repeat N timesp ["x]p2 put the text [from register x] after the cursor N timesq q{0-9a-zA-Z"} record typed characters into named register{0-9a-zA-Z"} (uppercase to append)q q (while recording) stops recordingQ Q2 replay last recorded registerq: q: edit : command-line in command-line windowq/ q/ edit / command-line in command-line windowq? q? edit ? command-line in command-line windowr r{char}2 replace N chars with{char}s ["x]s2 (substitute) delete N characters [into register x] and start insertt t{char}1 cursor till before Nth occurrence of{char} to the rightu u2 undo changesv v start charwise Visual modew w1 cursor N words forwardx ["x]x2 delete N characters under and after the cursor [into register x]y ["x]y{motion} yank Nmove text [into register x]yy ["x]yy yank N lines [into register x]z z{char} commands starting with 'z', seez below{ {1 cursor N paragraphs backwardbar |1 cursor to column N} }1 cursor N paragraphs forward~ ~2'tildeop' off: switch case of N characters under cursor and move the cursor N characters to the right~ ~{motion}'tildeop' on: switch case of Nmove text<C-End><C-End>1 same as "G"<C-Home><C-Home>1 same as "gg"<C-Left><C-Left>1 same as "b"<C-LeftMouse><C-LeftMouse> ":ta" to the keyword at the mouse click<C-Right><C-Right>1 same as "w"<C-RightMouse><C-RightMouse> same as "CTRL-T"<C-Tab><C-Tab> same as "g<Tab>"<Del> ["x]<Del>2 same as "x"N<Del>{count}<Del> remove the last digit from{count}<Down><Down>1 same as "j"<End><End>1 same as "$"<F1><F1> same as<Help><Help><Help> open a help window<Home><Home>1 same as "0"<Insert><Insert>2 same as "i"<Left><Left>1 same as "h"<LeftMouse><LeftMouse>1 move cursor to the mouse click position<MiddleMouse><MiddleMouse>2 same as "gP" at the mouse click position<PageDown><PageDown> same asCTRL-F<PageUp><PageUp> same asCTRL-B<Right><Right>1 same as "l"<RightMouse><RightMouse> start Visual mode, move cursor to the mouse click position<S-Down><S-Down>1 same asCTRL-F<S-Left><S-Left>1 same as "b"<S-LeftMouse><S-LeftMouse> same as "*" at the mouse click position<S-Right><S-Right>1 same as "w"<S-RightMouse><S-RightMouse> same as "#" at the mouse click position<S-Up><S-Up>1 same asCTRL-B<Undo><Undo>2 same as "u"<Up><Up>1 same as "k"<ScrollWheelDown><ScrollWheelDown>move window three lines down<S-ScrollWheelDown><S-ScrollWheelDown>move window one page down<ScrollWheelUp><ScrollWheelUp>move window three lines up<S-ScrollWheelUp><S-ScrollWheelUp>move window one page up<ScrollWheelLeft><ScrollWheelLeft>move window six columns left<S-ScrollWheelLeft><S-ScrollWheelLeft>move window one page left<ScrollWheelRight><ScrollWheelRight>move window six columns right<S-ScrollWheelRight><S-ScrollWheelRight>move window one page right

2.1 Text objectsobjects

These can be used after an operator or in Visual mode to select an object.
TagCommand Op-pending and Visual-mode action
------------------------------------------------------------------------------
v_aquote a" double quoted stringv_a' a' single quoted stringv_a( a( same as abv_a) a) same as abv_a< a< "a <>" from '<' to the matching '>'v_a> a> same as a<v_aB aB "a Block" from[{ to]} (with brackets)v_aW aW "a WORD" (with white space)v_a[ a[ "a []" from '[' to the matching ']'v_a] a] same as a[v_a` a` string in backticksv_ab ab "a block" from "[(" to "])" (with braces)v_ap ap "a paragraph" (with white space)v_as as "a sentence" (with white space)v_at at "a tag block" (with white space)v_aw aw "a word" (with white space)v_a{ a{ same as aBv_a} a} same as aBv_iquote i" double quoted string without the quotesv_i' i' single quoted string without the quotesv_i( i( same as ibv_i) i) same as ibv_i< i< "inner <>" from '<' to the matching '>'v_i> i> same as i<v_iB iB "inner Block" from[{ and]}v_iW iW "inner WORD"v_i[ i[ "inner []" from '[' to the matching ']'v_i] i] same as i[v_i` i` string in backticks without the backticksv_ib ib "inner block" from "[(" to "])"v_ip ip "inner paragraph"v_is is "inner sentence"v_it it "inner tag block"v_iw iw "inner word"v_i{ i{ same as iBv_i} i} same as iB

2.2 Window commandsCTRL-W

TagCommand Normal-mode action
------------------------------------------------------------------------------
CTRL-W_CTRL-BCTRL-WCTRL-B same as "CTRL-W b"CTRL-W_CTRL-CCTRL-WCTRL-C no-opCTRL-W_CTRL-DCTRL-WCTRL-D same as "CTRL-W d"CTRL-W_CTRL-FCTRL-WCTRL-F same as "CTRL-W f"CTRL-WCTRL-G same as "CTRL-W g .."CTRL-W_CTRL-HCTRL-WCTRL-H same as "CTRL-W h"CTRL-W_CTRL-ICTRL-WCTRL-I same as "CTRL-W i"CTRL-W_CTRL-JCTRL-WCTRL-J same as "CTRL-W j"CTRL-W_CTRL-KCTRL-WCTRL-K same as "CTRL-W k"CTRL-W_CTRL-LCTRL-WCTRL-L same as "CTRL-W l"CTRL-W_CTRL-NCTRL-WCTRL-N same as "CTRL-W n"CTRL-W_CTRL-OCTRL-WCTRL-O same as "CTRL-W o"CTRL-W_CTRL-PCTRL-WCTRL-P same as "CTRL-W p"CTRL-W_CTRL-QCTRL-WCTRL-Q same as "CTRL-W q"CTRL-W_CTRL-RCTRL-WCTRL-R same as "CTRL-W r"CTRL-W_CTRL-SCTRL-WCTRL-S same as "CTRL-W s"CTRL-W_CTRL-TCTRL-WCTRL-T same as "CTRL-W t"CTRL-W_CTRL-VCTRL-WCTRL-V same as "CTRL-W v"CTRL-W_CTRL-WCTRL-WCTRL-W same as "CTRL-W w"CTRL-W_CTRL-XCTRL-WCTRL-X same as "CTRL-W x"CTRL-W_CTRL-ZCTRL-WCTRL-Z same as "CTRL-W z"CTRL-W_CTRL-]CTRL-WCTRL-] same as "CTRL-W ]"CTRL-W_CTRL-^CTRL-WCTRL-^ same as "CTRL-W ^"CTRL-W_CTRL-_CTRL-WCTRL-_ same as "CTRL-W _"CTRL-W_+CTRL-W + increase current window height N linesCTRL-W_-CTRL-W - decrease current window height N linesCTRL-W_<CTRL-W < decrease current window width N columnsCTRL-W_=CTRL-W = make all windows the same height & widthCTRL-W_>CTRL-W > increase current window width N columnsCTRL-W_HCTRL-W H move current window to the far leftCTRL-W_JCTRL-W J move current window to the very bottomCTRL-W_KCTRL-W K move current window to the very topCTRL-W_LCTRL-W L move current window to the far rightCTRL-W_PCTRL-W P go to preview windowCTRL-W_RCTRL-W R rotate windows upwards N timesCTRL-W_SCTRL-W S same as "CTRL-W s"CTRL-W_TCTRL-W T move current window to a new tab pageCTRL-W_WCTRL-W W go to N previous window (wrap around)CTRL-W_]CTRL-W ] split window and jump to tag under cursorCTRL-W_^CTRL-W ^ split current window and edit alternate file NCTRL-W__CTRL-W _ set current window height to N (default: very high)CTRL-W_bCTRL-W b go to bottom windowCTRL-W_cCTRL-W c close current window (like:close)CTRL-W_dCTRL-W d split window and jump to definition under the cursorCTRL-W_fCTRL-W f split window and edit file name under the cursorCTRL-W_FCTRL-W F split window and edit file name under the cursor and jump to the line number following the file name.CTRL-W_g_CTRL-]CTRL-W gCTRL-] split window and do:tjump to tag under cursorCTRL-W_g]CTRL-W g ] split window and do:tselect for tag under cursorCTRL-W_g}CTRL-W g } do a:ptjump to the tag under the cursorCTRL-W_gfCTRL-W g f edit file name under the cursor in a new tab pageCTRL-W_gFCTRL-W g F edit file name under the cursor in a new tab page and jump to the line number following the file name.CTRL-W_gtCTRL-W g t same asgt: go to next tab pageCTRL-W_gTCTRL-W g T same asgT: go to previous tab pageCTRL-W_g<Tab>CTRL-W g<Tab> same asg<Tab>: go to last accessed tab pageCTRL-W_hCTRL-W h go to Nth left window (stop at first window)CTRL-W_iCTRL-W i split window and jump to declaration of identifier under the cursorCTRL-W_jCTRL-W j go N windows down (stop at last window)CTRL-W_kCTRL-W k go N windows up (stop at first window)CTRL-W_lCTRL-W l go to Nth right window (stop at last window)CTRL-W_nCTRL-W n open new window, N lines highCTRL-W_oCTRL-W o close all but current window (like:only)CTRL-W_pCTRL-W p go to previous (last accessed) windowCTRL-W_qCTRL-W q quit current window (like:quit)CTRL-W_rCTRL-W r rotate windows downwards N timesCTRL-W_sCTRL-W s split current window in two parts, new window N lines highCTRL-W_tCTRL-W t go to top windowCTRL-W_vCTRL-W v split current window vertically, new window N columns wideCTRL-W_wCTRL-W w go to N next window (wrap around)CTRL-W_xCTRL-W x exchange current window with window N (default: next window)CTRL-W_zCTRL-W z close preview windowCTRL-W_barCTRL-W | set window width to N columnsCTRL-W_}CTRL-W } show tag under cursor in preview windowCTRL-W_<Down>CTRL-W<Down> same as "CTRL-W j"CTRL-W_<Up>CTRL-W<Up> same as "CTRL-W k"CTRL-W_<Left>CTRL-W<Left> same as "CTRL-W h"CTRL-W_<Right>CTRL-W<Right> same as "CTRL-W l"

2.3 Square bracket commands[]

TagChar Note Normal-mode action
------------------------------------------------------------------------------
[_CTRL-D [CTRL-D jump to first #define found in current and included files matching the word under the cursor, start searching at beginning of current file[_CTRL-I [CTRL-I jump to first line in current and included files that contains the word under the cursor, start searching at beginning of current file[# [#1 cursor to N previous unmatched #if, #else or #ifdef[' ['1 cursor to previous lowercase mark, on first non-blank[( [(1 cursor N times back to unmatched '('[star [*1 same as "[/"[` [1 cursor to previous lowercase mark[/ [/1 cursor to N previous start of a C comment[D [D list all defines found in current and included files matching the word under the cursor, start searching at beginning of current file[I [I list all lines found in current and included files that contain the word under the cursor, start searching at beginning of current file[P [P2 same as "[p"[[ [[1 cursor N sections backward[] []1 cursor N SECTIONS backward[c [c1 cursor N times backwards to start of change[d [d show first #define found in current and included files matching the word under the cursor, start searching at beginning of current file[f [f same as "gf"[i [i show first line found in current and included files that contains the word under the cursor, start searching at beginning of current file[m [m1 cursor N times back to start of member function[p [p2 like "P", but adjust indent to current line[s [s1 move to the previous misspelled word[z [z1 move to start of open fold[{ [{1 cursor N times back to unmatched '{'[<MiddleMouse> [<MiddleMouse>2 same as "[p"
]_CTRL-D ]CTRL-D jump to first #define found in current and included files matching the word under the cursor, start searching at cursor position]_CTRL-I ]CTRL-I jump to first line in current and included files that contains the word under the cursor, start searching at cursor position]# ]#1 cursor to N next unmatched #endif or #else]' ]'1 cursor to next lowercase mark, on first non-blank]) ])1 cursor N times forward to unmatched ')']star ]*1 same as "]/"]` ]`1 cursor to next lowercase mark]/ ]/1 cursor to N next end of a C comment]D ]D list all #defines found in current and included files matching the word under the cursor, start searching at cursor position]I ]I list all lines found in current and included files that contain the word under the cursor, start searching at cursor position]P ]P2 same as "[p"][ ][1 cursor N SECTIONS forward]] ]]1 cursor N sections forward]c ]c1 cursor N times forward to start of change]d ]d show first #define found in current and included files matching the word under the cursor, start searching at cursor position]f ]f same as "gf"]i ]i show first line found in current and included files that contains the word under the cursor, start searching at cursor position]m ]m1 cursor N times forward to end of member function]p ]p2 like "p", but adjust indent to current line]s ]s1 move to next misspelled word]z ]z1 move to end of open fold]} ]}1 cursor N times forward to unmatched '}']<MiddleMouse> ]<MiddleMouse>2 same as "]p"

2.4 Commands starting with 'g'g

TagChar Note Normal-mode action
------------------------------------------------------------------------------
g_CTRL-G gCTRL-G show information about current cursor positiong_CTRL-H gCTRL-H start Select block modeg_CTRL-] gCTRL-]:tjump to the tag under the cursorg# g#1 like "#", but without using "\<" and "\>"g$ g$1 when'wrap' off go to rightmost character of the current line that is on the screen; when'wrap' on go to the rightmost character of the current screen lineg& g&2 repeat last ":s" on all linesg' g'{mark}1 like' but without changing the jumplistg` g`{mark}1 like` but without changing the jumplistgstar g*1 like "*", but without using "\<" and "\>"g+ g+ go to newer text state N timesg, g,1 go to N newer position in change listg- g- go to older text state N timesg0 g01 when'wrap' off go to leftmost character of the current line that is on the screen; when'wrap' on go to the leftmost character of the current screen lineg8 g8 print hex value of bytes used in UTF-8 character under the cursorg; g;1 go to N older position in change listg< g< display previous command outputg? g?2 Rot13 encoding operatorg?g? g??2 Rot13 encode current lineg?g? g?g?2 Rot13 encode current linegD gD1 go to definition of word under the cursor in current filegE gE1 go backwards to the end of the previous WORDgH gH start Select line modegI gI2 like "I", but always start in column 1gJ gJ2 join lines without inserting spacegN gN 1,2 find the previous match with the last used search pattern and Visually select itgP ["x]gP2 put the text [from register x] before the cursor N times, leave the cursor after itgQ gQ switch to "Ex" mode with Vim editinggR gR2 enter Virtual Replace modegT gT go to the previous tab pagegU gU{motion}2 make Nmove text uppercasegV gV don't reselect the previous Visual area when executing a mapping or menu in Select modeg] g] :tselect on the tag under the cursorg^ g^1 when'wrap' off go to leftmost non-white character of the current line that is on the screen; when'wrap' on go to the leftmost non-white character of the current screen lineg_ g_1 cursor to the last CHAR N - 1 lines lowerga ga print ascii value of character under the cursorgd gd1 go to definition of word under the cursor in current functionge ge1 go backwards to the end of the previous wordgf gf start editing the file whose name is under the cursorgF gF start editing the file whose name is under the cursor and jump to the line number following the filename.gg gg1 cursor to line N, default first linegh gh start Select modegi gi2 like "i", but first move to the'^ markgj gj1 like "j", but when'wrap' on go N screen lines downgk gk1 like "k", but when'wrap' on go N screen lines upgm gm1 go to character at middle of the screenlinegM gM1 go to character at middle of the text linegn gn 1,2 find the next match with the last used search pattern and Visually select itgo go1 cursor to byte N in the buffergp ["x]gp2 put the text [from register x] after the cursor N times, leave the cursor after itgq gq{motion}2 format Nmove textgr gr{char}2 virtual replace N chars with{char}gs gs go to sleep for N seconds (default 1)gt gt go to the next tab pagegu gu{motion}2 make Nmove text lowercasegv gv reselect the previous Visual areagw gw{motion}2 format Nmove text and keep cursorgx gx execute application for filepath at cursorg@ g@{motion} call'operatorfunc'g~ g~{motion}2 swap case for Nmove textg<Down> g<Down>1 same as "gj"g<End> g<End>1 same as "g$" but go to the rightmost non-blank character insteadg<Home> g<Home>1 same as "g0"g<LeftMouse> g<LeftMouse> same as<C-LeftMouse>g<MiddleMouse> same as<C-MiddleMouse>g<RightMouse> g<RightMouse> same as<C-RightMouse>g<Tab> g<Tab> go to last accessed tab pageg<Up> g<Up>1 same as "gk"

2.5 Commands starting with 'z'z

TagChar Note Normal-mode action
------------------------------------------------------------------------------
z<CR> z<CR> redraw, cursor line to top of window, cursor on first non-blankzN<CR> z{height}<CR> redraw, make window{height} lines highz+ z+ cursor on line N (default line below window), otherwise like "z<CR>"z- z- redraw, cursor line at bottom of window, cursor on first non-blankz. z. redraw, cursor line to center of window, cursor on first non-blankz= z= give spelling suggestionszA zA open a closed fold or close an open fold recursivelyzC zC close folds recursivelyzD zD delete folds recursivelyzE zE eliminate all foldszF zF create a fold for N lineszG zG temporarily mark word as correctly spelledzH zH when'wrap' off scroll half a screenwidth to the rightzL zL when'wrap' off scroll half a screenwidth to the leftzM zM set'foldlevel' to zerozN zN set'foldenable'zO zO open folds recursivelyzR zR set'foldlevel' to the deepest foldzW zW temporarily mark word as incorrectly spelledzX zX re-apply'foldlevel'z^ z^ cursor on line N (default line above window), otherwise like "z-"za za open a closed fold, close an open foldzb zb redraw, cursor line at bottom of windowzc zc close a foldzd zd delete a foldze ze when'wrap' off scroll horizontally to position the cursor at the end (right side) of the screenzf zf{motion} create a fold for Nmove textzg zg permanently mark word as correctly spelledzh zh when'wrap' off scroll screen N characters to the rightzi zi toggle'foldenable'zj zj1 move to the start of the next foldzk zk1 move to the end of the previous foldzl zl when'wrap' off scroll screen N characters to the leftzm zm subtract one from'foldlevel'zn zn reset'foldenable'zo zo open foldzp zp paste in block-mode without trailing spaceszP zP paste in block-mode without trailing spaceszr zr add one to'foldlevel'zs zs when'wrap' off scroll horizontally to position the cursor at the start (left side) of the screenzt zt redraw, cursor line at top of windowzuw zuw undozwzug zug undozgzuW zuW undozWzuG zuG undozGzv zv open enough folds to view the cursor linezw zw permanently mark word as incorrectly spelledzx zx re-apply'foldlevel' and do "zv"zy zy yank without trailing spaceszz zz redraw, cursor line at center of windowz<Left> z<Left> same as "zh"z<Right> z<Right> same as "zl"

2.6 Operator-pending modeoperator-pending-index

These can be used after an operator, but before a{motion} has been entered.
TagCharOperator-pending-mode action
------------------------------------------------------------------------------
o_v vforce operator to work charwiseo_V Vforce operator to work linewiseo_CTRL-VCTRL-Vforce operator to work blockwise

3. Visual modevisual-index

Most commands in Visual mode are the same as in Normal mode. The ones listedhere are those that are different.
TagCommand Note Visual-mode action
------------------------------------------------------------------------------
v_CTRL-\_CTRL-NCTRL-\CTRL-N stop Visual modev_CTRL-\_CTRL-GCTRL-\CTRL-G go to Normal modev_CTRL-ACTRL-A2 add N to number in highlighted textv_CTRL-CCTRL-C stop Visual modev_CTRL-GCTRL-G toggle between Visual mode and Select modev_<BS><BS>2 Select mode: delete highlighted areav_CTRL-HCTRL-H2 same as<BS>v_CTRL-OCTRL-O switch from Select to Visual mode for one commandv_CTRL-VCTRL-V make Visual mode blockwise or stop Visual modev_CTRL-XCTRL-X2 subtract N from number in highlighted textv_<Esc><Esc> stop Visual modev_CTRL-]CTRL-] jump to highlighted tagv_! !{filter}2 filter the highlighted lines through the external command{filter}v_: : start a command-line with the highlighted lines as a rangev_< <2 shift the highlighted lines one'shiftwidth' leftv_= =2 filter the highlighted lines through the external program given with the'equalprg' optionv_> >2 shift the highlighted lines one'shiftwidth' rightv_b_A A2 block mode: append same text in all lines, after the highlighted areav_C C2 delete the highlighted lines and start insertv_D D2 delete the highlighted linesv_b_I I2 block mode: insert same text in all lines, before the highlighted areav_J J2 join the highlighted linesv_K K run'keywordprg' on the highlighted areav_O O move horizontally to other corner of areav_P P replace highlighted area with register contents; registers are unchangedv_R R2 delete the highlighted lines and start insertv_S S2 delete the highlighted lines and start insertv_U U2 make highlighted area uppercasev_V V make Visual mode linewise or stop Visual modev_X X2 delete the highlighted linesv_Y Y yank the highlighted linesv_aquote a" extend highlighted area with a double quoted stringv_a' a' extend highlighted area with a single quoted stringv_a( a( same as abv_a) a) same as abv_a< a< extend highlighted area with a <> blockv_a> a> same as a<v_aB aB extend highlighted area with a {} blockv_aW aW extend highlighted area with "a WORD"v_a[ a[ extend highlighted area with a [] blockv_a] a] same as a[v_a` a` extend highlighted area with a backtick quoted stringv_ab ab extend highlighted area with a () blockv_ap ap extend highlighted area with a paragraphv_as as extend highlighted area with a sentencev_at at extend highlighted area with a tag blockv_aw aw extend highlighted area with "a word"v_a{ a{ same as aBv_a} a} same as aBv_c c2 delete highlighted area and start insertv_d d2 delete highlighted areav_g_CTRL-A gCTRL-A2 add N to number in highlighted textv_g_CTRL-X gCTRL-X2 subtract N from number in highlighted textv_gJ gJ2 join the highlighted lines without inserting spacesv_gq gq2 format the highlighted linesv_gv gv exchange current and previous highlighted areav_iquote i" extend highlighted area with a double quoted string (without quotes)v_i' i' extend highlighted area with a single quoted string (without quotes)v_i( i( same as ibv_i) i) same as ibv_i< i< extend highlighted area with inner <> blockv_i> i> same as i<v_iB iB extend highlighted area with inner {} blockv_iW iW extend highlighted area with "inner WORD"v_i[ i[ extend highlighted area with inner [] blockv_i] i] same as i[v_i` i` extend highlighted area with a backtick quoted string (without the backticks)v_ib ib extend highlighted area with inner () blockv_ip ip extend highlighted area with inner paragraphv_is is extend highlighted area with inner sentencev_it it extend highlighted area with inner tag blockv_iw iw extend highlighted area with "inner word"v_i{ i{ same as iBv_i} i} same as iBv_o o move cursor to other corner of areav_p p replace highlighted area with register contents; deleted text in unnamed registerv_r r2 replace highlighted area with a characterv_s s2 delete highlighted area and start insertv_u u2 make highlighted area lowercasev_v v make Visual mode charwise or stop Visual modev_x x2 delete the highlighted areav_y y yank the highlighted areav_~ ~2 swap case for the highlighted area

4. Command-line editingex-edit-index

Get to the command-line with the ':', '!', '/' or '?' commands.Normal characters are inserted at the current cursor position."Completion" below refers to context-sensitive completion. It will completefile names, tags, commands etc. as appropriate.
TagCommandCommand-line editing-mode action
------------------------------------------------------------------------------
CTRL-@not usedc_CTRL-ACTRL-Ado completion on the pattern in front of thecursor and insert all matchesc_CTRL-BCTRL-Bcursor to begin of command-linec_CTRL-CCTRL-Csame as<Esc>c_CTRL-DCTRL-Dlist completions that match the pattern infront of the cursorc_CTRL-ECTRL-Ecursor to end of command-line'cedit'CTRL-Fdefault value for'cedit': opens thecommand-line window; otherwise not usedc_CTRL-GCTRL-Gnext match when'incsearch' is activec_<BS><BS>delete the character in front of the cursorc_digraph{char1}<BS>{char2}enter digraph when'digraph' is onc_CTRL-HCTRL-Hsame as<BS>c_<Tab><Tab>if'wildchar' is<Tab>: Do completion onthe pattern in front of the cursorc_<S-Tab><S-Tab>same asCTRL-Pc_wildchar'wildchar'Do completion on the pattern in front of thecursor (default:<Tab>)c_CTRL-ICTRL-Isame as<Tab>c_<NL><NL>same as<CR>c_CTRL-JCTRL-Jsame as<CR>c_CTRL-KCTRL-K{char1}{char2}enter digraphc_CTRL-LCTRL-Ldo completion on the pattern in front of thecursor and insert the longest common partc_<CR><CR>execute entered commandc_CTRL-MCTRL-Msame as<CR>c_CTRL-NCTRL-Nafter using'wildchar' with multiple matches:go to next match, otherwise: recall oldercommand-line from history.CTRL-Onot usedc_CTRL-PCTRL-Pafter using'wildchar' with multiple matches:go to previous match, otherwise: recall oldercommand-line from history.c_CTRL-QCTRL-Qsame asCTRL-V, unless it's used for terminalcontrol flowc_CTRL-RCTRL-R{regname}insert the contents of a register or objectunder the cursor as if typedc_CTRL-R_CTRL-RCTRL-RCTRL-R{regname}c_CTRL-R_CTRL-OCTRL-RCTRL-O{regname}insert the contents of a register or objectunder the cursor literallyCTRL-Snot used, or used for terminal control flowc_CTRL-TCTRL-Tprevious match when'incsearch' is activec_CTRL-UCTRL-Uremove all charactersc_CTRL-VCTRL-Vinsert next non-digit literally, insert threedigit decimal number as a single byte.c_CTRL-WCTRL-Wdelete the word in front of the cursorCTRL-Xnot used (reserved for completion)CTRL-Ycopy (yank) modeless selectionCTRL-Znot used (reserved for suspend)c_<Esc><Esc>abandon command-line without executing itc_CTRL-[CTRL-[same as<Esc>c_CTRL-\_CTRL-NCTRL-\CTRL-Ngo to Normal mode, abandon command-linec_CTRL-\_CTRL-GCTRL-\CTRL-Ggo to Normal mode, abandon command-lineCTRL-\ a - dreserved for extensionsc_CTRL-\_eCTRL-\ e{expr} replace the command line with the result of{expr}CTRL-\ f - zreserved for extensionsCTRL-\ othersnot usedc_CTRL-]CTRL-]trigger abbreviationc_CTRL-^CTRL-^toggle use of:lmap mappingsc_<Del><Del>delete the character under the cursor
c_<Left><Left>cursor leftc_<S-Left><S-Left>cursor one word leftc_<C-Left><C-Left>cursor one word leftc_<Right><Right>cursor rightc_<S-Right><S-Right>cursor one word rightc_<C-Right><C-Right>cursor one word rightc_<Up><Up>recall previous command-line from history thatmatches pattern in front of the cursorc_<S-Up><S-Up>recall previous command-line from historyc_<Down><Down>recall next command-line from history thatmatches pattern in front of the cursorc_<S-Down><S-Down>recall next command-line from historyc_<Home><Home>cursor to start of command-linec_<End><End>cursor to end of command-linec_<PageDown><PageDown>same as<S-Down>c_<PageUp><PageUp>same as<S-Up>c_<Insert><Insert>toggle insert/overstrike modec_<LeftMouse><LeftMouse>cursor at mouse click
commands in wildmenu mode (see'wildmenu')
<Up>move up to parent<Down>move down to submenu<Left>select the previous match<Right>select the next match<CR>move into submenu when doing menu completionCTRL-Estop completion and go back to original textCTRL-Yaccept selected match and stop completionotherstop completion and insert the typed character
commands in wildmenu mode with'wildoptions' set to "pum"
<PageUp>select a match several entries back<PageDown>select a match several entries forward

5. Terminal modeterminal-mode-index

In aterminal buffer all keys exceptCTRL-\ are forwarded to the terminaljob. IfCTRL-\ is pressed, the next key is forwarded unless it isCTRL-NorCTRL-O.UseCTRL-\_CTRL-N to go to Normal mode.Uset_CTRL-\_CTRL-O to execute one normal mode command and then returnto terminal mode.
You found it, Arthur!holy-grail

6. EX commandsEx-commandsex-cmd-index:index

This is a brief but complete listing of all the ":" commands, withoutmentioning any arguments. The optional part of the command name is inside [].The commands are sorted on the non-optional part of their name.
TagCommandAction
------------------------------------------------------------------------------
: :nothing:range :{range}go to last line in{range}:! :!filter lines or execute an external command:!! :!!repeat last ":!" command:# :#same as ":number":& :&repeat last ":substitute":star :*use the last Visual area, like ":'<,'>":< :<shift lines one'shiftwidth' left:= :=print the last line number:> :>shift lines one'shiftwidth' right:@ :@execute contents of a register:@@ :@@repeat the previous ":@":2match :2mat[ch]define a second match to highlight:3match :3mat[ch]define a third match to highlight:Next :N[ext]go to previous file in the argument list:append :a[ppend]append text:abbreviate :ab[breviate]enter abbreviation:abclear :abc[lear]remove all abbreviations:aboveleft :abo[veleft]make split window appear left or above:all :al[l]open a window for each file in the argumentlist:amenu :am[enu]enter new menu item for all modes:anoremenu :an[oremenu]enter a new menu for all modes that will notbe remapped:args :ar[gs]print the argument list:argadd :arga[dd]add items to the argument list:argdedupe :argded[upe]remove duplicates from the argument list:argdelete :argd[elete]delete items from the argument list:argedit :arge[dit]add item to the argument list and edit it:argdo :argdodo a command on all items in the argument list:argglobal :argg[lobal]define the global argument list:arglocal :argl[ocal]define a local argument list:argument :argu[ment]go to specific file in the argument list:ascii :as[cii]print ascii value of character under the cursor:autocmd :au[tocmd]enter or show autocommands:augroup :aug[roup]select the autocommand group to use:aunmenu :aun[menu]remove menu for all modes:buffer :b[uffer]go to specific buffer in the buffer list:bNext :bN[ext]go to previous buffer in the buffer list:ball :ba[ll]open a window for each buffer in the buffer list:badd :bad[d]add buffer to the buffer list:balt :baltlike ":badd" but also set the alternate file:bdelete :bd[elete]remove a buffer from the buffer list:belowright :bel[owright]make split window appear right or below:bfirst :bf[irst]go to first buffer in the buffer list:blast :bl[ast]go to last buffer in the buffer list:bmodified :bm[odified]go to next buffer in the buffer list that hasbeen modified:bnext :bn[ext]go to next buffer in the buffer list:botright :bo[tright]make split window appear at bottom or far right:bprevious :bp[revious]go to previous buffer in the buffer list:brewind :br[ewind]go to first buffer in the buffer list:break :brea[k]break out of while loop:breakadd :breaka[dd]add a debugger breakpoint:breakdel :breakd[el]delete a debugger breakpoint:breaklist :breakl[ist]list debugger breakpoints:browse :bro[wse]use file selection dialog:bufdo :bufd[o]execute command in each listed buffer:buffers :bufferslist all files in the buffer list:bunload :bun[load]unload a specific buffer:bwipeout :bw[ipeout]really delete a buffer:change :c[hange]replace a line or series of lines:cNext :cN[ext]go to previous error:cNfile :cNf[ile]go to last error in previous file:cabbrev :ca[bbrev]like ":abbreviate" but for Command-line mode:cabclear :cabc[lear]clear all abbreviations for Command-line mode:cabove :cabo[ve]go to error above current line:caddbuffer :cad[dbuffer]add errors from buffer:caddexpr :cadde[xpr]add errors from expr:caddfile :caddf[ile]add error message to current quickfix list:cafter :caf[ter]go to error after current cursor:call :cal[l]call a function:catch :cat[ch]part of a :try command:cbefore :cbe[fore]go to error before current cursor:cbelow :cbel[ow]go to error below current line:cbottom :cbo[ttom]scroll to the bottom of the quickfix window:cbuffer :cb[uffer]parse error messages and jump to first error:cc :ccgo to specific error:cclose :ccl[ose]close quickfix window:cd :cdchange directory:cdo :cdoexecute command in each valid error list entry:cfdo :cfd[o]execute command in each file in error list:center :ce[nter]format lines at the center:cexpr :cex[pr]read errors from expr and jump to first:cfile :cf[ile]read file with error messages and jump to first:cfirst :cfir[st]go to the specified error, default first one:cgetbuffer :cgetb[uffer]get errors from buffer:cgetexpr :cgete[xpr]get errors from expr:cgetfile :cg[etfile]read file with error messages:changes :changesprint the change list:chdir :chd[ir]change directory:checkhealth :che[ckhealth]run healthchecks:checkpath :checkp[ath]list included files:checktime :checkt[ime]check timestamp of loaded buffers:chistory :chi[story]list the error lists:clast :cla[st]go to the specified error, default last one:clearjumps :cle[arjumps]clear the jump list:clist :cl[ist]list all errors:close :clo[se]close current window:cmap :cm[ap]like ":map" but for Command-line mode:cmapclear :cmapc[lear]clear all mappings for Command-line mode:cmenu :cme[nu]add menu for Command-line mode:cnext :cn[ext]go to next error:cnewer :cnew[er]go to newer error list:cnfile :cnf[ile]go to first error in next file:cnoremap :cno[remap]like ":noremap" but for Command-line mode:cnoreabbrev :cnorea[bbrev]like ":noreabbrev" but for Command-line mode:cnoremenu :cnoreme[nu]like ":noremenu" but for Command-line mode:copy :co[py]copy lines:colder :col[der]go to older error list:colorscheme :colo[rscheme]load a specific color scheme:command :com[mand]create user-defined command:comclear :comc[lear]clear all user-defined commands:compiler :comp[iler]do settings for a specific compiler:continue :con[tinue]go back to :while:confirm :conf[irm]prompt user when confirmation required:const :cons[t]create a variable as a constant:copen :cope[n]open quickfix window:cprevious :cp[revious]go to previous error:cpfile :cpf[ile]go to last error in previous file:cquit :cq[uit]quit Vim with an error code:crewind :cr[ewind]go to the specified error, default first one:cunmap :cu[nmap]like ":unmap" but for Command-line mode:cunabbrev :cuna[bbrev]like ":unabbrev" but for Command-line mode:cunmenu :cunme[nu]remove menu for Command-line mode:cwindow :cw[indow]open or close quickfix window:delete :d[elete]delete lines:debug :deb[ug]run a command in debugging mode:debuggreedy :debugg[reedy]read debug mode commands from normal input:defer :defe[r]call function when current function is done:delcommand :delc[ommand]delete user-defined command:delfunction :delf[unction]delete a user function:delmarks :delm[arks]delete marks:detach :detachdetach the current UI:diffupdate :dif[fupdate]update'diff' buffers:diffget :diffg[et]remove differences in current buffer:diffoff :diffo[ff]switch off diff mode:diffpatch :diffp[atch]apply a patch and show differences:diffput :diffpu[t]remove differences in other buffer:diffsplit :diffs[plit]show differences with another file:diffthis :difft[his]make current window a diff window:digraphs :dig[raphs]show or enter digraphs:display :di[splay]display registers:djump :dj[ump]jump to #define:dl :dlshort for:delete with the 'l' flag:dlist :dli[st]list #defines:doautocmd :do[autocmd]apply autocommands to current buffer:doautoall :doautoa[ll]apply autocommands for all loaded buffers:dp :d[elete]pshort for:delete with the 'p' flag:drop :dr[op]jump to window editing file or edit file incurrent window:dsearch :ds[earch]list one #define:dsplit :dsp[lit]split window and jump to #define:edit :e[dit]edit a file:earlier :ea[rlier]go to older change, undo:echo :ec[ho]echoes the result of expressions:echoerr :echoe[rr]like :echo, show like an error and use history:echohl :echoh[l]set highlighting for echo commands:echomsg :echom[sg]same as :echo, put message in history:echon :echonsame as :echo, but without<EOL>:else :el[se]part of an :if command:elseif :elsei[f]part of an :if command:emenu :em[enu]execute a menu by name:endif :en[dif]end previous :if:endfor :endfo[r]end previous :for:endfunction :endf[unction]end of a user function started with :function:endtry :endt[ry]end previous :try:endwhile :endw[hile]end previous :while:enew :ene[w]edit a new, unnamed buffer:eval :ev[al]evaluate an expression and discard the result:ex :exsame as ":edit":execute :exe[cute]execute result of expressions:exit :exi[t]same as ":xit":exusage :exu[sage]overview of Ex commands:fclose :fc[lose]close floating window:file :f[ile]show or set the current file name:files :fileslist all files in the buffer list:filetype :filet[ype]switch file type detection on/off:filter :filt[er]filter output of following command:find :fin[d]find file in'path' and edit it:finally :fina[lly]part of a :try command:finish :fini[sh]quit sourcing a Vim script:first :fir[st]go to the first file in the argument list:fold :fo[ld]create a fold:foldclose :foldc[lose]close folds:folddoopen :foldd[oopen]execute command on lines not in a closed fold:folddoclosed :folddoc[losed]execute command on lines in a closed fold:foldopen :foldo[pen]open folds:for :forfor loop:function :fu[nction]define a user function:global :g[lobal]execute commands for matching lines:goto :go[to]go to byte in the buffer:grep :gr[ep]run'grepprg' and jump to first match:grepadd :grepa[dd]like :grep, but append to current list:gui :gu[i]start the GUI:gvim :gv[im]start the GUI:help :h[elp]open a help window:helpclose :helpc[lose]close one help window:helpgrep :helpg[rep]like ":grep" but searches help files:helptags :helpt[ags]generate help tags for a directory:highlight :hi[ghlight]specify highlighting methods:hide :hid[e]hide current buffer for a command:history :his[tory]print a history list:horizontal :hor[izontal]following window command work horizontally:insert :i[nsert]insert text:iabbrev :ia[bbrev]like ":abbrev" but for Insert mode:iabclear :iabc[lear]like ":abclear" but for Insert mode:if :ifexecute commands when condition met:ijump :ij[ump]jump to definition of identifier:ilist :il[ist]list lines where identifier matches:imap :im[ap]like ":map" but for Insert mode:imapclear :imapc[lear]like ":mapclear" but for Insert mode:imenu :ime[nu]add menu for Insert mode:inoremap :ino[remap]like ":noremap" but for Insert mode:inoreabbrev :inorea[bbrev]like ":noreabbrev" but for Insert mode:inoremenu :inoreme[nu]like ":noremenu" but for Insert mode:intro :int[ro]print the introductory message:iput :ip[ut]like:put, but adjust the indent to thecurrent line:isearch :is[earch]list one line where identifier matches:isplit :isp[lit]split window and jump to definition ofidentifier:iunmap :iu[nmap]like ":unmap" but for Insert mode:iunabbrev :iuna[bbrev]like ":unabbrev" but for Insert mode:iunmenu :iunme[nu]remove menu for Insert mode:join :j[oin]join lines:jumps :ju[mps]print the jump list:k :kset a mark:keepalt :keepa[lt]following command keeps the alternate file:keepmarks :kee[pmarks]following command keeps marks where they are:keepjumps :keepj[umps]following command keeps jumplist and marks:keeppatterns :keepp[atterns]following command keeps search pattern history:lNext :lN[ext]go to previous entry in location list:lNfile :lNf[ile]go to last entry in previous file:list :l[ist]print lines:labove :lab[ove]go to location above current line:laddexpr :lad[dexpr]add locations from expr:laddbuffer :laddb[uffer]add locations from buffer:laddfile :laddf[ile]add locations to current location list:lafter :laf[ter]go to location after current cursor:last :la[st]go to the last file in the argument list:language :lan[guage]set the language (locale):later :lat[er]go to newer change, redo:lbefore :lbe[fore]go to location before current cursor:lbelow :lbel[ow]go to location below current line:lbottom :lbo[ttom]scroll to the bottom of the location window:lbuffer :lb[uffer]parse locations and jump to first location:lcd :lc[d]change directory locally:lchdir :lch[dir]change directory locally:lclose :lcl[ose]close location window:ldo :ld[o]execute command in valid location list entries:lfdo :lfd[o]execute command in each file in location list:left :le[ft]left align lines:leftabove :lefta[bove]make split window appear left or above:let :letassign a value to a variable or option:lexpr :lex[pr]read locations from expr and jump to first:lfile :lf[ile]read file with locations and jump to first:lfirst :lfir[st]go to the specified location, default first one:lgetbuffer :lgetb[uffer]get locations from buffer:lgetexpr :lgete[xpr]get locations from expr:lgetfile :lg[etfile]read file with locations:lgrep :lgr[ep]run'grepprg' and jump to first match:lgrepadd :lgrepa[dd]like :grep, but append to current list:lhelpgrep :lh[elpgrep]like ":helpgrep" but uses location list:lhistory :lhi[story]list the location lists:ll :llgo to specific location:llast :lla[st]go to the specified location, default last one:llist :lli[st]list all locations:lmake :lmak[e]execute external command'makeprg' and parseerror messages:lmap :lm[ap]like ":map!" but includes Lang-Arg mode:lmapclear :lmapc[lear]like ":mapclear!" but includes Lang-Arg mode:lnext :lne[xt]go to next location:lnewer :lnew[er]go to newer location list:lnfile :lnf[ile]go to first location in next file:lnoremap :ln[oremap]like ":noremap!" but includes Lang-Arg mode:loadkeymap :loadk[eymap]load the following keymaps until EOF:loadview :lo[adview]load view for current window from a file:lockmarks :loc[kmarks]following command keeps marks where they are:lockvar :lockv[ar]lock variables:lolder :lol[der]go to older location list:lopen :lop[en]open location window:lprevious :lp[revious]go to previous location:lpfile :lpf[ile]go to last location in previous file:lrewind :lr[ewind]go to the specified location, default first one:ls :lslist all buffers:ltag :lt[ag]jump to tag and add matching tags to thelocation list:lunmap :lu[nmap]like ":unmap!" but includes Lang-Arg mode:lua :luaexecuteLua command:luado :luad[o]execute Lua command for each line:luafile :luaf[ile]executeLua script file:lvimgrep :lv[imgrep]search for pattern in files:lvimgrepadd :lvimgrepa[dd]like :vimgrep, but append to current list:lwindow :lw[indow]open or close location window:move :m[ove]move lines:mark :ma[rk]set a mark:make :mak[e]execute external command'makeprg' and parseerror messages:map :mapshow or enter a mapping:mapclear :mapc[lear]clear all mappings for Normal and Visual mode:marks :markslist all marks:match :mat[ch]define a match to highlight:menu :me[nu]enter a new menu item:menutranslate :menut[ranslate] add a menu translation item:messages :mes[sages]view previously displayed messages:mkexrc :mk[exrc]write current mappings and settings to a file:mksession :mks[ession]write session info to a file:mkspell :mksp[ell]produce .spl spell file:mkvimrc :mkv[imrc]write current mappings and settings to a file:mkview :mkvie[w]write view of current window to a file:mode :mod[e]show or change the screen mode:next :n[ext]go to next file in the argument list:new :newcreate a new empty window:nmap :nm[ap]like ":map" but for Normal mode:nmapclear :nmapc[lear]clear all mappings for Normal mode:nmenu :nme[nu]add menu for Normal mode:nnoremap :nn[oremap]like ":noremap" but for Normal mode:nnoremenu :nnoreme[nu]like ":noremenu" but for Normal mode:noautocmd :noa[utocmd]following commands don't trigger autocommands:noremap :no[remap]enter a mapping that will not be remapped:nohlsearch :noh[lsearch]suspend'hlsearch' highlighting:noreabbrev :norea[bbrev]enter an abbreviation that will not beremapped:noremenu :noreme[nu]enter a menu that will not be remapped:normal :norm[al]execute Normal mode commands:noswapfile :nos[wapfile]following commands don't create a swap file:number :nu[mber]print lines with line number:nunmap :nun[map]like ":unmap" but for Normal mode:nunmenu :nunme[nu]remove menu for Normal mode:oldfiles :ol[dfiles]list files that have marks in theshada file:omap :om[ap]like ":map" but for Operator-pending mode:omapclear :omapc[lear]remove all mappings for Operator-pending mode:omenu :ome[nu]add menu for Operator-pending mode:only :on[ly]close all windows except the current one:onoremap :ono[remap]like ":noremap" but for Operator-pending mode:onoremenu :onoreme[nu]like ":noremenu" but for Operator-pending mode:options :opt[ions]open the options-window:ounmap :ou[nmap]like ":unmap" but for Operator-pending mode:ounmenu :ounme[nu]remove menu for Operator-pending mode:packadd :pa[ckadd]add a plugin from'packpath':packloadall :packl[oadall]load all packages under'packpath':pbuffer :pb[uffer]edit buffer in the preview window:pclose :pc[lose]close preview window:pedit :ped[it]edit file in the preview window:perl :pe[rl]execute perl command:perldo :perld[o]execute perl command for each line:perlfile :perlf[ile]execute perl script file:print :p[rint]print lines:profdel :profd[el]stop profiling a function or script:profile :prof[ile]profiling functions and scripts:pop :po[p]jump to older entry in tag stack:popup :popu[p]popup a menu by name:ppop :pp[op]":pop" in preview window:preserve :pre[serve]write all text to swap file:previous :prev[ious]go to previous file in argument list:psearch :ps[earch]like ":ijump" but shows match in preview window:ptag :pt[ag]show tag in preview window:ptNext :ptN[ext]:tNext in preview window:ptfirst :ptf[irst]:trewind in preview window:ptjump :ptj[ump]:tjump and show tag in preview window:ptlast :ptl[ast]:tlast in preview window:ptnext :ptn[ext]:tnext in preview window:ptprevious :ptp[revious]:tprevious in preview window:ptrewind :ptr[ewind]:trewind in preview window:ptselect :pts[elect]:tselect and show tag in preview window:put :pu[t]insert contents of register in the text:pwd :pw[d]print current directory:py3 :py3execute Python 3 command:python3 :python3same as :py3:py3do :py3d[o]execute Python 3 command for each line:py3file :py3f[ile]execute Python 3 script file:python :py[thon]execute Python command:pydo :pyd[o]execute Python command for each line:pyfile :pyf[ile]execute Python script file:pyx :pyxexecutepython_x command:pythonx :pythonxsame as :pyx:pyxdo :pyxd[o]executepython_x command for each line:pyxfile :pyxf[ile]executepython_x script file:quit :q[uit]quit current window (when one window quit Vim):quitall :quita[ll]quit Vim:qall :qa[ll]quit Vim:read :r[ead]read file into the text:recover :rec[over]recover a file from a swap file:redo :red[o]redo one undone change:redir :redi[r]redirect messages to a file or register:redraw :redr[aw]force a redraw of the display:redrawstatus :redraws[tatus]force a redraw of the status line(s) andwindow bar(s):redrawtabline :redrawt[abline] force a redraw of the tabline:registers :reg[isters]display the contents of registers:resize :res[ize]change current window height:restart :restartrestart the Nvim server:retab :ret[ab]change tab size:return :retu[rn]return from a user function:rewind :rew[ind]go to the first file in the argument list:right :ri[ght]right align text:rightbelow :rightb[elow]make split window appear right or below:rshada :rsh[ada]read fromshada file:ruby :rub[y]execute Ruby command:rubydo :rubyd[o]execute Ruby command for each line:rubyfile :rubyf[ile]execute Ruby script file:rundo :rund[o]read undo information from a file:runtime :ru[ntime]source vim scripts in'runtimepath':substitute :s[ubstitute]find and replace text:sNext :sN[ext]split window and go to previous file inargument list:sandbox :san[dbox]execute a command in the sandbox:sargument :sa[rgument]split window and go to specific file inargument list:sall :sal[l]open a window for each file in argument list:saveas :sav[eas]save file under another name.:sbuffer :sb[uffer]split window and go to specific file in thebuffer list:sbNext :sbN[ext]split window and go to previous file in thebuffer list:sball :sba[ll]open a window for each file in the buffer list:sbfirst :sbf[irst]split window and go to first file in thebuffer list:sblast :sbl[ast]split window and go to last file in bufferlist:sbmodified :sbm[odified]split window and go to modified file in thebuffer list:sbnext :sbn[ext]split window and go to next file in the bufferlist:sbprevious :sbp[revious]split window and go to previous file in thebuffer list:sbrewind :sbr[ewind]split window and go to first file in thebuffer list:scriptnames :scr[iptnames]list names of all sourced Vim scripts:scriptencoding :scripte[ncoding] encoding used in sourced Vim script:set :se[t]show or set options:setfiletype :setf[iletype]set'filetype', unless it was set already:setglobal :setg[lobal]show global values of options:setlocal :setl[ocal]show or set options locally:sfind :sf[ind]split current window and edit file in'path':sfirst :sfir[st]split window and go to first file in theargument list:sign :sig[n]manipulate signs:silent :sil[ent]run a command silently:sleep :sl[eep]do nothing for a few seconds:sleep! :sl[eep]!do nothing for a few seconds, without thecursor visible:slast :sla[st]split window and go to last file in theargument list:smagic :sm[agic]:substitute with'magic':smap :smaplike ":map" but for Select mode:smapclear :smapc[lear]remove all mappings for Select mode:smenu :sme[nu]add menu for Select mode:snext :sn[ext]split window and go to next file in theargument list:snomagic :sno[magic]:substitute with'nomagic':snoremap :snor[emap]like ":noremap" but for Select mode:snoremenu :snoreme[nu]like ":noremenu" but for Select mode:sort :sor[t]sort lines:source :so[urce]read Vim or Ex commands from a file:spelldump :spelld[ump]split window and fill with all correct words:spellgood :spe[llgood]add good word for spelling:spellinfo :spelli[nfo]show info about loaded spell files:spellrare :spellra[re]add rare word for spelling:spellrepall :spellr[epall]replace all bad words like lastz=:spellundo :spellu[ndo]remove good or bad word:spellwrong :spellw[rong]add spelling mistake:split :sp[lit]split current window:sprevious :spr[evious]split window and go to previous file in theargument list:srewind :sre[wind]split window and go to first file in theargument list:stop :st[op]suspend the editor or escape to a shell:stag :sta[g]split window and jump to a tag:startinsert :star[tinsert]start Insert mode:startgreplace :startg[replace] start Virtual Replace mode:startreplace :startr[eplace]start Replace mode:stopinsert :stopi[nsert]stop Insert mode:stjump :stj[ump]do ":tjump" and split window:stselect :sts[elect]do ":tselect" and split window:sunhide :sun[hide]same as ":unhide":sunmap :sunm[ap]like ":unmap" but for Select mode:sunmenu :sunme[nu]remove menu for Select mode:suspend :sus[pend]same as ":stop":sview :sv[iew]split window and edit file read-only:swapname :sw[apname]show the name of the current swap file:syntax :sy[ntax]syntax highlighting:syntime :synti[me]measure syntax highlighting speed:syncbind :sync[bind]sync scroll binding:t :tsame as ":copy":tNext :tN[ext]jump to previous matching tag:tabNext :tabN[ext]go to previous tab page:tabclose :tabc[lose]close current tab page:tabdo :tabd[o]execute command in each tab page:tabedit :tabe[dit]edit a file in a new tab page:tabfind :tabf[ind]find file in'path', edit it in a new tab page:tabfirst :tabfir[st]go to first tab page:tablast :tabl[ast]go to last tab page:tabmove :tabm[ove]move tab page to other position:tabnew :tabnewedit a file in a new tab page:tabnext :tabn[ext]go to next tab page:tabonly :tabo[nly]close all tab pages except the current one:tabprevious :tabp[revious]go to previous tab page:tabrewind :tabr[ewind]go to first tab page:tabs :tabslist the tab pages and what they contain:tab :tabcreate new tab when opening new window:tag :ta[g]jump to tag:tags :tagsshow the contents of the tag stack:tcd :tc[d]change directory for tab page:tchdir :tch[dir]change directory for tab page:terminal :te[rminal]open a terminal buffer:tfirst :tf[irst]jump to first matching tag:throw :th[row]throw an exception:tjump :tj[ump]like ":tselect", but jump directly when thereis only one match:tlast :tl[ast]jump to last matching tag:tlmenu :tlm[enu]add menu forTerminal-mode:tlnoremenu :tln[oremenu]like ":noremenu" but forTerminal-mode:tlunmenu :tlu[nmenu]remove menu forTerminal-mode:tmapclear :tmapc[lear]remove all mappings forTerminal-mode:tmap :tma[p]like ":map" but forTerminal-mode:tmenu :tm[enu]define menu tooltip:tnext :tn[ext]jump to next matching tag:tnoremap :tno[remap]like ":noremap" but forTerminal-mode:topleft :to[pleft]make split window appear at top or far left:tprevious :tp[revious]jump to previous matching tag:trewind :tr[ewind]jump to first matching tag:trust :trustadd or remove file from trust database:try :tryexecute commands, abort on error or exception:tselect :ts[elect]list matching tags and select one:tunmap :tunma[p]like ":unmap" but forTerminal-mode:tunmenu :tu[nmenu]remove menu tooltip:undo :u[ndo]undo last change(s):undojoin :undoj[oin]join next change with previous undo block:undolist :undol[ist]list leafs of the undo tree:unabbreviate :una[bbreviate]remove abbreviation:unhide :unh[ide]open a window for each loaded file in thebuffer list:uniq :uni[q]uniq lines:unlet :unl[et]delete variable:unlockvar :unlo[ckvar]unlock variables:unmap :unm[ap]remove mapping:unmenu :unme[nu]remove menu:unsilent :uns[ilent]run a command not silently:update :up[date]write buffer if modified:vglobal :v[global]execute commands for not matching lines:version :ve[rsion]print version number and other info:verbose :verb[ose]execute command with'verbose' set:vertical :vert[ical]make following command split vertically:vimgrep :vim[grep]search for pattern in files:vimgrepadd :vimgrepa[dd]like :vimgrep, but append to current list:visual :vi[sual]same as ":edit", but turns off "Ex" mode:viusage :viu[sage]overview of Normal mode commands:view :vie[w]edit a file read-only:vmap :vm[ap]like ":map" but for Visual+Select mode:vmapclear :vmapc[lear]remove all mappings for Visual+Select mode:vmenu :vme[nu]add menu for Visual+Select mode:vnew :vne[w]create a new empty window, vertically split:vnoremap :vn[oremap]like ":noremap" but for Visual+Select mode:vnoremenu :vnoreme[nu]like ":noremenu" but for Visual+Select mode:vsplit :vs[plit]split current window vertically:vunmap :vu[nmap]like ":unmap" but for Visual+Select mode:vunmenu :vunme[nu]remove menu for Visual+Select mode:windo :wind[o]execute command in each window:write :w[rite]write to a file:wNext :wN[ext]write to a file and go to previous file inargument list:wall :wa[ll]write all (changed) buffers:while :wh[ile]execute loop for as long as condition met:winsize :wi[nsize]get or set window size (obsolete):wincmd :winc[md]execute a Window (CTRL-W) command:winpos :winp[os]get or set window position:wnext :wn[ext]write to a file and go to next file inargument list:wprevious :wp[revious]write to a file and go to previous file inargument list:wq :wqwrite to a file and quit window or Vim:wqall :wqa[ll]write all changed buffers and quit Vim:wshada :wsh[ada]write to ShaDa file:wundo :wu[ndo]write undo information to a file:xit :x[it]write if buffer changed and close window:xall :xa[ll]same as ":wqall":xmapclear :xmapc[lear]remove all mappings for Visual mode:xmap :xm[ap]like ":map" but for Visual mode:xmenu :xme[nu]add menu for Visual mode:xnoremap :xn[oremap]like ":noremap" but for Visual mode:xnoremenu :xnoreme[nu]like ":noremenu" but for Visual mode:xunmap :xu[nmap]like ":unmap" but for Visual mode:xunmenu :xunme[nu]remove menu for Visual mode:yank :y[ank]yank lines into a register:z :zprint some lines:~ :~repeat last ":substitute"
Main
Commands index
Quick reference

1. Insert mode
2. Normal mode
2.1 Text objects
2.2 Window commands
2.3 Square bracket commands
2.4 Commands starting with 'g'
2.5 Commands starting with 'z'
2.6 Operator-pending mode
3. Visual mode
4. Command-line editing
5. Terminal mode
6. EX commands

[8]ページ先頭

©2009-2025 Movatter.jp