# # https://github.com/ccammack/anki-vim-quickref # # Import vim-quickref.csv into Anki with these Import Options: # # Type: Basic (and reversed card) # Deck: vim-quickref # Fields separated by: Tab # Allow HTML in fields: [checked] # # https://raw.githubusercontent.com/vim/vim/master/runtime/doc/quickref.txt # # *quickref.txt* For Vim version 9.1. Last change: 2024 Mar 03 # (Left-right motions)
N h (Left-right motions)
left (also: CTRL-H, <BS>, or <Left> key) (Left-right motions)
N l (Left-right motions)
right (also: <Space> or <Right> key) (Left-right motions)
0 (Left-right motions)
to first character in the line (also: <Home> key) (Left-right motions)
^ (Left-right motions)
to first non-blank character in the line (Left-right motions)
N $ (Left-right motions)
to the last character in the line (N-1 lines lower) (also: <End> key) (Left-right motions)
g0 (Left-right motions)
to first character in screen line (differs from "0" when lines wrap) (Left-right motions)
g^ (Left-right motions)
to first non-blank character in screen line (differs from "^" when lines wrap) (Left-right motions)
N g$ (Left-right motions)
to last character in screen line (differs from "$" when lines wrap) (Left-right motions)
gm (Left-right motions)
to middle of the screen line (Left-right motions)
gM (Left-right motions)
to middle of the line (Left-right motions)
N | (Left-right motions)
to column N (default: 1) (Left-right motions)
N f{char} (Left-right motions)
to the Nth occurrence of {char} to the right (Left-right motions)
N F{char} (Left-right motions)
to the Nth occurrence of {char} to the left (Left-right motions)
N t{char} (Left-right motions)
till before the Nth occurrence of {char} to the right (Left-right motions)
N T{char} (Left-right motions)
till before the Nth occurrence of {char} to the left (Left-right motions)
N ; (Left-right motions)
repeat the last "f", "F", "t", or "T" N times (Left-right motions)
N , (Left-right motions)
repeat the last "f", "F", "t", or "T" N times in opposite direction (Up-down motions)
N k (Up-down motions)
up N lines (also: CTRL-P and <Up>) (Up-down motions)
N j (Up-down motions)
down N lines (also: CTRL-J, CTRL-N, <NL>, and <Down>) (Up-down motions)
N - (Up-down motions)
up N lines, on the first non-blank character (Up-down motions)
N + (Up-down motions)
down N lines, on the first non-blank character (also: CTRL-M and <CR>) (Up-down motions)
N _ (Up-down motions)
down N-1 lines, on the first non-blank character (Up-down motions)
N G (Up-down motions)
goto line N (default: last line), on the first non-blank character (Up-down motions)
N gg (Up-down motions)
goto line N (default: first line), on the first non-blank character (Up-down motions)
N % (Up-down motions)
goto line N percentage down in the file; N must be given, otherwise it is the |%| command (Up-down motions)
N gk (Up-down motions)
up N screen lines (differs from "k" when line wraps) (Up-down motions)
N gj (Up-down motions)
down N screen lines (differs from "j" when line wraps) (Text object motions)
N w (Text object motions)
N words forward (Text object motions)
N W (Text object motions)
N blank-separated |WORD|s forward (Text object motions)
N e (Text object motions)
forward to the end of the Nth word (Text object motions)
N E (Text object motions)
forward to the end of the Nth blank-separated |WORD| (Text object motions)
N b (Text object motions)
N words backward (Text object motions)
N B (Text object motions)
N blank-separated |WORD|s backward (Text object motions)
N ge (Text object motions)
backward to the end of the Nth word (Text object motions)
N gE (Text object motions)
backward to the end of the Nth blank-separated |WORD| (Text object motions)
N ) (Text object motions)
N sentences forward (Text object motions)
N ( (Text object motions)
N sentences backward (Text object motions)
N } (Text object motions)
N paragraphs forward (Text object motions)
N { (Text object motions)
N paragraphs backward (Text object motions)
N ]] (Text object motions)
N sections forward, at start of section (Text object motions)
N [[ (Text object motions)
N sections backward, at start of section (Text object motions)
N ][ (Text object motions)
N sections forward, at end of section (Text object motions)
N [] (Text object motions)
N sections backward, at end of section (Text object motions)
N [( (Text object motions)
N times back to unclosed '(' (Text object motions)
N [{ (Text object motions)
N times back to unclosed '{' (Text object motions)
N [m (Text object motions)
N times back to start of method (for Java) (Text object motions)
N [M (Text object motions)
N times back to end of method (for Java) (Text object motions)
N ]) (Text object motions)
N times forward to unclosed ')' (Text object motions)
N ]} (Text object motions)
N times forward to unclosed '}' (Text object motions)
N ]m (Text object motions)
N times forward to start of method (for Java) (Text object motions)
N ]M (Text object motions)
N times forward to end of method (for Java) (Text object motions)
N [# (Text object motions)
N times back to unclosed "#if" or "#else" (Text object motions)
N ]# (Text object motions)
N times forward to unclosed "#else" or "#endif" (Text object motions)
N [* (Text object motions)
N times back to start of comment "/*" (Text object motions)
N ]* (Text object motions)
N times forward to end of comment "*/" (Pattern searches)
N /{pattern}[/[offset]]<CR> (Pattern searches)
search forward for the Nth occurrence of {pattern} (Pattern searches)
N ?{pattern}[?[offset]]<CR> (Pattern searches)
search backward for the Nth occurrence of {pattern} (Pattern searches)
N /<CR> (Pattern searches)
repeat last search, in the forward direction (Pattern searches)
N ?<CR> (Pattern searches)
repeat last search, in the backward direction (Pattern searches)
N n (Pattern searches)
repeat last search (Pattern searches)
N N (Pattern searches)
repeat last search, in opposite direction (Pattern searches)
N * (Pattern searches)
search forward for the identifier under the cursor (Pattern searches)
N # (Pattern searches)
search backward for the identifier under the cursor (Pattern searches)
N g* (Pattern searches)
like "*", but also find partial matches (Pattern searches)
N g# (Pattern searches)
like "#", but also find partial matches (Pattern searches)
gd (Pattern searches)
goto local declaration of identifier under the cursor (Pattern searches)
gD (Pattern searches)
goto global declaration of identifier under the cursor (Marks and motions)
m{a-zA-Z} (Marks and motions)
mark current position with mark {a-zA-Z} (Marks and motions)
`{a-z} (Marks and motions)
go to mark {a-z} within current file (Marks and motions)
`{A-Z} (Marks and motions)
go to mark {A-Z} in any file (Marks and motions)
`{0-9} (Marks and motions)
go to the position where Vim was previously exited (Marks and motions)
`` (Marks and motions)
go to the position before the last jump (Marks and motions)
`" (Marks and motions)
go to the position when last editing this file (Marks and motions)
`[ (Marks and motions)
go to the start of the previously operated or put text (Marks and motions)
`] (Marks and motions)
go to the end of the previously operated or put text (Marks and motions)
`< (Marks and motions)
go to the start of the (previous) Visual area (Marks and motions)
`> (Marks and motions)
go to the end of the (previous) Visual area (Marks and motions)
`. (Marks and motions)
go to the position of the last change in this file (Marks and motions)
'{a-zA-Z0-9[]'"<>.} (Marks and motions)
same as `, but on the first non-blank in the line (Marks and motions)
:marks (Marks and motions)
print the active marks (Marks and motions)
N CTRL-O (Marks and motions)
go to Nth older position in jump list (Marks and motions)
N CTRL-I (Marks and motions)
go to Nth newer position in jump list (Marks and motions)
:ju[mps] (Marks and motions)
print the jump list (Various motions)
% (Various motions)
find the next brace, bracket, comment, or "#if"/ "#else"/"#endif" in this line and go to its match (Various motions)
N H (Various motions)
go to the Nth line in the window, on the first non-blank (Various motions)
M (Various motions)
go to the middle line in the window, on the first non-blank (Various motions)
N L (Various motions)
go to the Nth line from the bottom, on the first non-blank (Various motions)
N go (Various motions)
go to Nth byte in the buffer (Various motions)
:[range]go[to] [off] (Various motions)
go to [off] byte in the buffer (Using tags)
:ta[g][!] {tag} (Using tags)
jump to tag {tag} (Using tags)
:[count]ta[g][!] (Using tags)
jump to [count]'th newer tag in tag list (Using tags)
CTRL-] (Using tags)
jump to the tag under cursor, unless changes have been made (Using tags)
:ts[elect][!] [tag] (Using tags)
list matching tags and select one to jump to (Using tags)
:tj[ump][!] [tag] (Using tags)
jump to tag [tag] or select from list when there are multiple matches (Using tags)
:lt[ag][!] [tag] (Using tags)
jump to tag [tag] and add matching tags to the location list (Using tags)
:tags (Using tags)
print tag list (Using tags)
N CTRL-T (Using tags)
jump back from Nth older tag in tag list (Using tags)
:[count]po[p][!] (Using tags)
jump back from [count]'th older tag in tag list (Using tags)
:[count]tn[ext][!] (Using tags)
jump to [count]'th next matching tag (Using tags)
:[count]tp[revious][!] (Using tags)
jump to [count]'th previous matching tag (Using tags)
:[count]tr[ewind][!] (Using tags)
jump to [count]'th matching tag (Using tags)
:tl[ast][!] (Using tags)
jump to last matching tag (Using tags)
:pt[ag] {tag} (Using tags)
open a preview window to show tag {tag} (Using tags)
CTRL-W } (Using tags)
like CTRL-] but show tag in preview window (Using tags)
:pts[elect] (Using tags)
like ":tselect" but show tag in preview window (Using tags)
:ptj[ump] (Using tags)
like ":tjump" but show tag in preview window (Using tags)
:pc[lose] (Using tags)
close tag preview window (Using tags)
CTRL-W z (Using tags)
close tag preview window (Scrolling)
N CTRL-E (Scrolling)
window N lines downwards (default: 1) (Scrolling)
N CTRL-D (Scrolling)
window N lines Downwards (default: 1/2 window) (Scrolling)
N CTRL-F (Scrolling)
window N pages Forwards (downwards) (Scrolling)
N CTRL-Y (Scrolling)
window N lines upwards (default: 1) (Scrolling)
N CTRL-U (Scrolling)
window N lines Upwards (default: 1/2 window) (Scrolling)
N CTRL-B (Scrolling)
window N pages Backwards (upwards) (Scrolling)
z<CR> or zt (Scrolling)
redraw, current line at top of window (Scrolling)
z. (Scrolling)
or zz redraw, current line at center of window (Scrolling)
z- (Scrolling)
or zb redraw, current line at bottom of window (Scrolling)
N zh (Scrolling)
scroll screen N characters to the right (Scrolling)
N zl (Scrolling)
scroll screen N characters to the left (Scrolling)
N zH (Scrolling)
scroll screen half a screenwidth to the right (Scrolling)
N zL (Scrolling)
scroll screen half a screenwidth to the left (Inserting text)
N a (Inserting text)
append text after the cursor (N times) (Inserting text)
N A (Inserting text)
append text at the end of the line (N times) (Inserting text)
N i (Inserting text)
insert text before the cursor (N times) (also: <Insert>) (Inserting text)
N I (Inserting text)
insert text before the first non-blank in the line (N times) (Inserting text)
N gI (Inserting text)
insert text in column 1 (N times) (Inserting text)
N o (Inserting text)
open a new line below the current line, append text (N times) (Inserting text)
N O (Inserting text)
open a new line above the current line, append text (N times) (Inserting text)
:star[tinsert][!] (Inserting text)
start Insert mode, append when [!] used (Inserting text)
:startr[eplace][!] (Inserting text)
start Replace mode, at EOL when [!] used (Inserting text)
I (Inserting text)
insert the same text in front of all the selected lines (Inserting text)
A (Inserting text)
append the same text after all the selected lines (Insert mode keys)
<Esc> (Insert mode keys)
end Insert mode, back to Normal mode (Insert mode keys)
CTRL-C (Insert mode keys)
like <Esc>, but do not use an abbreviation (Insert mode keys)
CTRL-O {command} (Insert mode keys)
execute {command} and return to Insert mode (Insert mode keys)
cursor keys (Insert mode keys)
move cursor left/right/up/down (Insert mode keys)
shift-left/right (Insert mode keys)
one word left/right (Insert mode keys)
shift-up/down (Insert mode keys)
one screenful backward/forward (Insert mode keys)
<End> (Insert mode keys)
cursor after last character in the line (Insert mode keys)
<Home> (Insert mode keys)
cursor to first character in the line (Special keys in Insert mode)
CTRL-V {char}.. (Special keys in Insert mode)
insert character literally, or enter decimal byte value (Special keys in Insert mode)
<NL> or <CR> or CTRL-M or CTRL-J (Special keys in Insert mode)
begin new line (Special keys in Insert mode)
CTRL-E (Special keys in Insert mode)
insert the character from below the cursor (Special keys in Insert mode)
CTRL-Y (Special keys in Insert mode)
insert the character from above the cursor (Special keys in Insert mode)
CTRL-A (Special keys in Insert mode)
insert previously inserted text (Special keys in Insert mode)
CTRL-@ (Special keys in Insert mode)
insert previously inserted text and stop Insert mode (Special keys in Insert mode)
CTRL-R {register} (Special keys in Insert mode)
insert the contents of a register (Special keys in Insert mode)
CTRL-N (Special keys in Insert mode)
insert next match of identifier before the cursor (Special keys in Insert mode)
CTRL-P (Special keys in Insert mode)
insert previous match of identifier before the cursor (Special keys in Insert mode)
CTRL-X ... (Special keys in Insert mode)
complete the word before the cursor in various ways (Special keys in Insert mode)
<BS> or CTRL-H (Special keys in Insert mode)
delete the character before the cursor (Special keys in Insert mode)
<Del> (Special keys in Insert mode)
delete the character under the cursor (Special keys in Insert mode)
CTRL-W (Special keys in Insert mode)
delete word before the cursor (Special keys in Insert mode)
CTRL-U (Special keys in Insert mode)
delete all entered characters in the current line (Special keys in Insert mode)
CTRL-T (Special keys in Insert mode)
insert one shiftwidth of indent in front of the current line (Special keys in Insert mode)
CTRL-D (Special keys in Insert mode)
delete one shiftwidth of indent in front of the current line (Special keys in Insert mode)
0 CTRL-D (Special keys in Insert mode)
delete all indent in the current line (Special keys in Insert mode)
^ CTRL-D (Special keys in Insert mode)
delete all indent in the current line, restore indent in next line (Digraphs)
:dig[raphs] (Digraphs)
show current list of digraphs (Digraphs)
:dig[raphs] {char1}{char2} {number} ... (Digraphs)
add digraph(s) to the list (Digraphs)
CTRL-K {char1} {char2} (Digraphs)
enter digraph (Digraphs)
{char1} <BS> {char2} (Digraphs)
enter digraph if 'digraph' option set (Special inserts)
:r [file] (Special inserts)
insert the contents of [file] below the cursor (Special inserts)
:r! {command} insert the standard output of {command} below the (Special inserts)
cursor (Deleting text)
N x (Deleting text)
delete N characters under and after the cursor (Deleting text)
N <Del> (Deleting text)
delete N characters under and after the cursor (Deleting text)
N X (Deleting text)
delete N characters before the cursor (Deleting text)
N d{motion} (Deleting text)
delete the text that is moved over with {motion} (Deleting text)
{visual}d (Deleting text)
delete the highlighted text (Deleting text)
N dd (Deleting text)
delete N lines (Deleting text)
N D (Deleting text)
delete to the end of the line (and N-1 more lines) (Deleting text)
N J (Deleting text)
join N-1 lines (delete <EOL>s) (Deleting text)
{visual}J (Deleting text)
join the highlighted lines (Deleting text)
N gJ (Deleting text)
like "J", but without inserting spaces (Deleting text)
{visual}gJ (Deleting text)
like "{visual}J", but without inserting spaces (Deleting text)
:[range]d [x] (Deleting text)
delete [range] lines [into register x] (Copying and moving text)
"{char} (Copying and moving text)
use register {char} for the next delete, yank, or put (Copying and moving text)
:reg (Copying and moving text)
show the contents of all registers (Copying and moving text)
:reg {arg} (Copying and moving text)
show the contents of registers mentioned in {arg} (Copying and moving text)
N y{motion} (Copying and moving text)
yank the text moved over with {motion} into a register (Copying and moving text)
{visual}y (Copying and moving text)
yank the highlighted text into a register (Copying and moving text)
N yy (Copying and moving text)
yank N lines into a register (Copying and moving text)
N Y (Copying and moving text)
yank N lines into a register (Copying and moving text)
N p (Copying and moving text)
put a register after the cursor position (N times) (Copying and moving text)
N P (Copying and moving text)
put a register before the cursor position (N times) (Copying and moving text)
N ]p (Copying and moving text)
like p, but adjust indent to current line (Copying and moving text)
N [p (Copying and moving text)
like P, but adjust indent to current line (Copying and moving text)
N gp (Copying and moving text)
like p, but leave cursor after the new text (Copying and moving text)
N gP (Copying and moving text)
like P, but leave cursor after the new text (Changing text)
N r{char} (Changing text)
replace N characters with {char} (Changing text)
N gr{char} (Changing text)
replace N characters without affecting layout (Changing text)
N R (Changing text)
enter Replace mode (repeat the entered text N times) (Changing text)
N gR (Changing text)
enter virtual Replace mode: Like Replace mode but without affecting layout (Changing text)
{visual}r{char} (Changing text)
in Visual block mode: Replace each char of the selected text with {char} (Changing text)
N c{motion} (Changing text)
change the text that is moved over with {motion} (Changing text)
{visual}c (Changing text)
change the highlighted text (Changing text)
N cc (Changing text)
change N lines (Changing text)
N S (Changing text)
change N lines (Changing text)
N C (Changing text)
change to the end of the line (and N-1 more lines) (Changing text)
N s (Changing text)
change N characters (Changing text)
{visual}c (Changing text)
in Visual block mode: Change each of the selected lines with the entered text (Changing text)
{visual}C (Changing text)
in Visual block mode: Change each of the selected lines until end-of-line with the entered text (Changing text)
N ~ (Changing text)
switch case for N characters and advance cursor (Changing text)
{visual}~ (Changing text)
switch case for highlighted text (Changing text)
{visual}u (Changing text)
make highlighted text lowercase (Changing text)
{visual}U (Changing text)
make highlighted text uppercase (Changing text)
g~{motion} switch case for the text that is moved over with (Changing text)
{motion} (Changing text)
gu{motion} make the text that is moved over with {motion} (Changing text)
lowercase (Changing text)
gU{motion} make the text that is moved over with {motion} (Changing text)
uppercase (Changing text)
{visual}g? (Changing text)
perform rot13 encoding on highlighted text (Changing text)
g?{motion} perform rot13 encoding on the text that is moved over (Changing text)
with {motion} (Changing text)
N CTRL-A (Changing text)
add N to the number at or after the cursor (Changing text)
N CTRL-X (Changing text)
subtract N from the number at or after the cursor (Changing text)
N <{motion} (Changing text)
move the lines that are moved over with {motion} one shiftwidth left (Changing text)
N << (Changing text)
move N lines one shiftwidth left (Changing text)
N >{motion} (Changing text)
move the lines that are moved over with {motion} one shiftwidth right (Changing text)
N >> (Changing text)
move N lines one shiftwidth right (Changing text)
N gq{motion} (Changing text)
format the lines that are moved over with {motion} to 'textwidth' length (Changing text)
:[range]ce[nter] [width] (Changing text)
center the lines in [range] (Changing text)
:[range]le[ft] [indent] (Changing text)
left-align the lines in [range] (with [indent]) (Changing text)
:[range]ri[ght] [width] (Changing text)
right-align the lines in [range] (Complex changes)
N !{motion}{command}<CR> (Complex changes)
filter the lines that are moved over through {command} (Complex changes)
N !!{command}<CR> (Complex changes)
filter N lines through {command} (Complex changes)
{visual}!{command}<CR> (Complex changes)
filter the highlighted lines through {command} (Complex changes)
:[range]! {command}<CR> (Complex changes)
filter [range] lines through {command} (Complex changes)
N ={motion} (Complex changes)
filter the lines that are moved over through 'equalprg' (Complex changes)
N == (Complex changes)
filter N lines through 'equalprg' (Complex changes)
{visual}= (Complex changes)
filter the highlighted lines through 'equalprg' (Complex changes)
:[range]s[ubstitute]/{pattern}/{string}/[g][c] (Complex changes)
substitute {pattern} by {string} in [range] lines; with [g], replace all occurrences of {pattern}; with [c], confirm each replacement (Complex changes)
:[range]s[ubstitute] [g][c] (Complex changes)
repeat previous ":s" with new range and options (Complex changes)
& (Complex changes)
Repeat previous ":s" on current line without options (Complex changes)
:[range]ret[ab][!] [tabstop] (Complex changes)
set 'tabstop' to new value and adjust white space accordingly (Visual mode)
v (Visual mode)
start highlighting characters } move cursor and use (Visual mode)
V (Visual mode)
start highlighting linewise } operator to affect (Visual mode)
CTRL-V (Visual mode)
start highlighting blockwise } highlighted text (Visual mode)
o (Visual mode)
exchange cursor position with start of highlighting (Visual mode)
gv (Visual mode)
start highlighting on previous visual area (Visual mode)
v (Visual mode)
highlight characters or stop highlighting (Visual mode)
V (Visual mode)
highlight linewise or stop highlighting (Visual mode)
CTRL-V (Visual mode)
highlight blockwise or stop highlighting (Text objects (only in Visual mode or after an operator))
N aw (Text objects (only in Visual mode or after an operator))
Select "a word" (Text objects (only in Visual mode or after an operator))
N iw (Text objects (only in Visual mode or after an operator))
Select "inner word" (Text objects (only in Visual mode or after an operator))
N aW (Text objects (only in Visual mode or after an operator))
Select "a |WORD|" (Text objects (only in Visual mode or after an operator))
N iW (Text objects (only in Visual mode or after an operator))
Select "inner |WORD|" (Text objects (only in Visual mode or after an operator))
N as (Text objects (only in Visual mode or after an operator))
Select "a sentence" (Text objects (only in Visual mode or after an operator))
N is (Text objects (only in Visual mode or after an operator))
Select "inner sentence" (Text objects (only in Visual mode or after an operator))
N ap (Text objects (only in Visual mode or after an operator))
Select "a paragraph" (Text objects (only in Visual mode or after an operator))
N ip (Text objects (only in Visual mode or after an operator))
Select "inner paragraph" (Text objects (only in Visual mode or after an operator))
N ab (Text objects (only in Visual mode or after an operator))
Select "a block" (from "[(" to "])") (Text objects (only in Visual mode or after an operator))
N ib (Text objects (only in Visual mode or after an operator))
Select "inner block" (from "[(" to "])") (Text objects (only in Visual mode or after an operator))
N aB (Text objects (only in Visual mode or after an operator))
Select "a Block" (from "[{" to "]}") (Text objects (only in Visual mode or after an operator))
N iB (Text objects (only in Visual mode or after an operator))
Select "inner Block" (from "[{" to "]}") (Text objects (only in Visual mode or after an operator))
N a> (Text objects (only in Visual mode or after an operator))
Select "a <> block" (Text objects (only in Visual mode or after an operator))
N i> (Text objects (only in Visual mode or after an operator))
Select "inner <> block" (Text objects (only in Visual mode or after an operator))
N at (Text objects (only in Visual mode or after an operator))
Select "a tag block" (from <aaa> to </aaa>) (Text objects (only in Visual mode or after an operator))
N it (Text objects (only in Visual mode or after an operator))
Select "inner tag block" (from <aaa> to </aaa>) (Text objects (only in Visual mode or after an operator))
N a' (Text objects (only in Visual mode or after an operator))
Select "a single quoted string" (Text objects (only in Visual mode or after an operator))
N i' (Text objects (only in Visual mode or after an operator))
Select "inner single quoted string" (Text objects (only in Visual mode or after an operator))
N a" (Text objects (only in Visual mode or after an operator))
Select "a double quoted string" (Text objects (only in Visual mode or after an operator))
N i" (Text objects (only in Visual mode or after an operator))
Select "inner double quoted string" (Text objects (only in Visual mode or after an operator))
N a` (Text objects (only in Visual mode or after an operator))
Select "a backward quoted string" (Text objects (only in Visual mode or after an operator))
N i` (Text objects (only in Visual mode or after an operator))
Select "inner backward quoted string" (Repeating commands)
N . (Repeating commands)
repeat last change (with count replaced with N) (Repeating commands)
q{a-z} (Repeating commands)
record typed characters into register {a-z} (Repeating commands)
q{A-Z} (Repeating commands)
record typed characters, appended to register {a-z} (Repeating commands)
q (Repeating commands)
stop recording (Repeating commands)
N @{a-z} (Repeating commands)
execute the contents of register {a-z} (N times) (Repeating commands)
N @@ (Repeating commands)
repeat previous @{a-z} (N times) (Repeating commands)
:@{a-z} (Repeating commands)
execute the contents of register {a-z} as an Ex command (Repeating commands)
:@@ (Repeating commands)
repeat previous :@{a-z} (Repeating commands)
:[range]g[lobal]/{pattern}/[cmd] (Repeating commands)
execute Ex command [cmd] (default: ":p") on the lines within [range] where {pattern} matches (Repeating commands)
:[range]g[lobal]!/{pattern}/[cmd] (Repeating commands)
execute Ex command [cmd] (default: ":p") on the lines within [range] where {pattern} does NOT match (Repeating commands)
:so[urce] {file} (Repeating commands)
read Ex commands from {file} (Repeating commands)
:so[urce]! {file} (Repeating commands)
read Vim commands from {file} (Repeating commands)
:sl[eep] [sec] (Repeating commands)
don't do anything for [sec] seconds (Repeating commands)
N gs (Repeating commands)
goto Sleep for N seconds (Key mapping)
:ma[p] {lhs} {rhs} (Key mapping)
map {lhs} to {rhs} in Normal and Visual mode (Key mapping)
:ma[p]! {lhs} {rhs} map {lhs} to {rhs} in Insert and Command-line (Key mapping)
mode (Key mapping)
:no[remap][!] {lhs} {rhs} (Key mapping)
same as ":map", no remapping for this {rhs} (Key mapping)
:unm[ap] {lhs} (Key mapping)
remove the mapping of {lhs} for Normal and Visual mode (Key mapping)
:unm[ap]! {lhs} (Key mapping)
remove the mapping of {lhs} for Insert and Command-line mode (Key mapping)
:ma[p] [lhs] (Key mapping)
list mappings (starting with [lhs]) for Normal and Visual mode (Key mapping)
:ma[p]! [lhs] (Key mapping)
list mappings (starting with [lhs]) for Insert and Command-line mode (Key mapping)
:cmap/:cunmap/:cnoremap (Key mapping)
like ":map!"/":unmap!"/":noremap!" but for Command-line mode only (Key mapping)
:imap/:iunmap/:inoremap (Key mapping)
like ":map!"/":unmap!"/":noremap!" but for Insert mode only (Key mapping)
:nmap/:nunmap/:nnoremap (Key mapping)
like ":map"/":unmap"/":noremap" but for Normal mode only (Key mapping)
:vmap/:vunmap/:vnoremap (Key mapping)
like ":map"/":unmap"/":noremap" but for Visual mode only (Key mapping)
:omap/:ounmap/:onoremap (Key mapping)
like ":map"/":unmap"/":noremap" but only for when an operator is pending (Key mapping)
:mapc[lear] (Key mapping)
remove mappings for Normal and Visual mode (Key mapping)
:mapc[lear]! (Key mapping)
remove mappings for Insert and Cmdline mode (Key mapping)
:imapc[lear] (Key mapping)
remove mappings for Insert mode (Key mapping)
:vmapc[lear] (Key mapping)
remove mappings for Visual mode (Key mapping)
:omapc[lear] (Key mapping)
remove mappings for Operator-pending mode (Key mapping)
:nmapc[lear] (Key mapping)
remove mappings for Normal mode (Key mapping)
:cmapc[lear] (Key mapping)
remove mappings for Cmdline mode (Key mapping)
:mk[exrc][!] [file] write current mappings, abbreviations, and (Key mapping)
settings to [file] (default: ".exrc"; use ! to overwrite) (Key mapping)
:mkv[imrc][!] [file] (Key mapping)
same as ":mkexrc", but with default ".vimrc" (Key mapping)
:mks[ession][!] [file] (Key mapping)
like ":mkvimrc", but store current files, windows, etc. too, to be able to continue this session later (Abbreviations)
:ab[breviate] {lhs} {rhs} (Abbreviations)
add abbreviation for {lhs} to {rhs} (Abbreviations)
:ab[breviate] {lhs} (Abbreviations)
show abbr's that start with {lhs} (Abbreviations)
:ab[breviate] (Abbreviations)
show all abbreviations (Abbreviations)
:una[bbreviate] {lhs} (Abbreviations)
remove abbreviation for {lhs} (Abbreviations)
:norea[bbrev] [lhs] [rhs] (Abbreviations)
like ":ab", but don't remap [rhs] (Abbreviations)
:iab/:iunab/:inoreab (Abbreviations)
like ":ab", but only for Insert mode (Abbreviations)
:cab/:cunab/:cnoreab (Abbreviations)
like ":ab", but only for Command-line mode (Abbreviations)
:abc[lear] (Abbreviations)
remove all abbreviations (Abbreviations)
:cabc[lear] (Abbreviations)
remove all abbr's for Cmdline mode (Abbreviations)
:iabc[lear] (Abbreviations)
remove all abbr's for Insert mode (Options)
:se[t] (Options)
show all modified options (Options)
:se[t] all (Options)
show all non-termcap options (Options)
:se[t] termcap (Options)
show all termcap options (Options)
:se[t] {option} (Options)
set boolean option (switch it on), show string or number option (Options)
:se[t] no{option} (Options)
reset boolean option (switch it off) (Options)
:se[t] inv{option} (Options)
invert boolean option (Options)
:se[t] {option}={value} (Options)
set string/number option to {value} (Options)
:se[t] {option}+={value} append {value} to string option, add (Options)
{value} to number option (Options)
:se[t] {option}-={value} remove {value} to string option, (Options)
subtract {value} from number option (Options)
:se[t] {option}? (Options)
show value of {option} (Options)
:se[t] {option}& (Options)
reset {option} to its default value (Options)
:setl[ocal] (Options)
like ":set" but set the local value for options that have one (Options)
:setg[lobal] (Options)
like ":set" but set the global value of a local option (Options)
:fix[del] (Options)
set value of 't_kD' according to value of 't_kb' (Options)
:opt[ions] (Options)
open a new window to view and set options, grouped by functionality, a one line explanation and links to the help (Undo/Redo commands)
N u (Undo/Redo commands)
undo last N changes (Undo/Redo commands)
N CTRL-R (Undo/Redo commands)
redo last N undone changes (Undo/Redo commands)
U (Undo/Redo commands)
restore last changed line (External commands)
:sh[ell] (External commands)
start a shell (External commands)
:!{command} (External commands)
execute {command} with a shell (External commands)
K (External commands)
lookup keyword under the cursor with 'keywordprg' program (default: "man") (Quickfix commands)
:cc [nr] (Quickfix commands)
display error [nr] (default is the same again) (Quickfix commands)
:cn (Quickfix commands)
display the next error (Quickfix commands)
:cp (Quickfix commands)
display the previous error (Quickfix commands)
:cl (Quickfix commands)
list all errors (Quickfix commands)
:cf (Quickfix commands)
read errors from the file 'errorfile' (Quickfix commands)
:cgetb (Quickfix commands)
like :cbuffer but don't jump to the first error (Quickfix commands)
:cg (Quickfix commands)
like :cfile but don't jump to the first error (Quickfix commands)
:cgete (Quickfix commands)
like :cexpr but don't jump to the first error (Quickfix commands)
:caddf (Quickfix commands)
add errors from the error file to the current quickfix list (Quickfix commands)
:cad (Quickfix commands)
add errors from an expression to the current quickfix list (Quickfix commands)
:cb (Quickfix commands)
read errors from text in a buffer (Quickfix commands)
:cex (Quickfix commands)
read errors from an expression (Quickfix commands)
:cq (Quickfix commands)
quit without writing and return error code (to the compiler) (Quickfix commands)
:make [args] (Quickfix commands)
start make, read errors, and jump to first error (Quickfix commands)
:gr[ep] [args] (Quickfix commands)
execute 'grepprg' to find matches and jump to the first one (Various commands)
CTRL-L (Various commands)
clear and redraw the screen (Various commands)
CTRL-G (Various commands)
show current file name (with path) and cursor position (Various commands)
ga (Various commands)
show ascii value of character under cursor in decimal, hex, and octal (Various commands)
g8 (Various commands)
for utf-8 encoding: show byte sequence for character under cursor in hex (Various commands)
g CTRL-G (Various commands)
show cursor column, line, and character position (Various commands)
CTRL-C (Various commands)
during searches: Interrupt the search (Various commands)
CTRL-Break (Various commands)
MS-Windows: during searches: Interrupt the search (Various commands)
<Del> (Various commands)
while entering a count: delete last character (Various commands)
:ve[rsion] (Various commands)
show version information (Various commands)
:mode N (Various commands)
set screen mode to N (obsolete) (Various commands)
:norm[al][!] {commands} (Various commands)
execute Normal mode commands (Various commands)
Q (Various commands)
switch to "Ex" mode (Various commands)
:redir >{file} (Various commands)
redirect messages to {file} (Various commands)
:silent[!] {command} (Various commands)
execute {command} silently (Various commands)
:confirm {command} (Various commands)
quit, write, etc., asking about unsaved changes or read-only files (Various commands)
:browse {command} (Various commands)
open/read/write file, using a file selection dialog (Command-line editing)
<Esc> (Command-line editing)
abandon command-line (if 'wildchar' is <Esc>, type it twice) (Command-line editing)
CTRL-V {char} (Command-line editing)
insert {char} literally (Command-line editing)
CTRL-V {number} enter decimal value of character (up to (Command-line editing)
three digits) (Command-line editing)
CTRL-K {char1} {char2} (Command-line editing)
enter digraph (See |Q_di|) (Command-line editing)
CTRL-R {register} (Command-line editing)
insert the contents of a register (Command-line editing)
<Left>/<Right> (Command-line editing)
cursor left/right (Command-line editing)
<S-Left>/<S-Right> (Command-line editing)
cursor one word left/right (Command-line editing)
CTRL-B/CTRL-E (Command-line editing)
cursor to beginning/end of command-line (Command-line editing)
<BS> (Command-line editing)
delete the character in front of the cursor (Command-line editing)
<Del> (Command-line editing)
delete the character under the cursor (Command-line editing)
CTRL-W (Command-line editing)
delete the word in front of the cursor (Command-line editing)
CTRL-U (Command-line editing)
remove all characters (Command-line editing)
<Up>/<Down> (Command-line editing)
recall older/newer command-line that starts with current command (Command-line editing)
<S-Up>/<S-Down> (Command-line editing)
recall older/newer command-line from history (Command-line editing)
CTRL-G (Command-line editing)
next match when 'incsearch' is active (Command-line editing)
CTRL-T (Command-line editing)
previous match when 'incsearch' is active (Command-line editing)
:his[tory] (Command-line editing)
show older command-lines (Command-line editing)
CTRL-D (Command-line editing)
list all names that match the pattern in front of the cursor (Command-line editing)
CTRL-A (Command-line editing)
insert all names that match pattern in front of cursor (Command-line editing)
CTRL-L (Command-line editing)
insert longest common part of names that match pattern (Command-line editing)
CTRL-N (Command-line editing)
after 'wildchar' with multiple matches: go to next match (Command-line editing)
CTRL-P (Command-line editing)
after 'wildchar' with multiple matches: go to previous match (Ex ranges)
, (Ex ranges)
separates two line numbers (Ex ranges)
; (Ex ranges)
idem, set cursor to the first line number before interpreting the second one (Ex ranges)
{number} (Ex ranges)
an absolute line number (Ex ranges)
. (Ex ranges)
the current line (Ex ranges)
$ (Ex ranges)
the last line in the file (Ex ranges)
% (Ex ranges)
equal to 1,$ (the entire file) (Ex ranges)
* (Ex ranges)
equal to '<,'> (visual area) (Ex ranges)
't (Ex ranges)
position of mark t (Ex ranges)
/{pattern}[/] (Ex ranges)
the next line where {pattern} matches (Ex ranges)
?{pattern}[?] (Ex ranges)
the previous line where {pattern} matches (Ex ranges)
+[num] (Ex ranges)
add [num] to the preceding line number (default: 1) (Ex ranges)
-[num] (Ex ranges)
subtract [num] from the preceding line number (default: 1) (Starting Vim)
vim [options] (Starting Vim)
start editing with an empty buffer (Starting Vim)
vim [options] {file} .. (Starting Vim)
start editing one or more files (Starting Vim)
vim [options] - (Starting Vim)
read file from stdin (Starting Vim)
vim [options] -t {tag} (Starting Vim)
edit the file associated with {tag} (Starting Vim)
vim [options] -q [fname] (Starting Vim)
start editing in QuickFix mode, display the first error (Editing a file)
:e[dit][!] {file} (Editing a file)
edit {file} (Editing a file)
:e[dit][!] (Editing a file)
reload the current file (Editing a file)
:ene[w][!] (Editing a file)
edit a new, unnamed buffer (Editing a file)
:fin[d][!] {file} (Editing a file)
find {file} in 'path' and edit it (Editing a file)
N CTRL-^ (Editing a file)
edit alternate file N (equivalent to ":e #N") (Editing a file)
gf or ]f (Editing a file)
edit the file whose name is under the cursor (Editing a file)
:pwd (Editing a file)
print the current directory name (Editing a file)
:cd [path] (Editing a file)
change the current directory to [path] (Editing a file)
:cd - (Editing a file)
back to previous current directory (Editing a file)
:f[ile] (Editing a file)
print the current file name and the cursor position (Editing a file)
:f[ile] {name} (Editing a file)
set the current file name to {name} (Editing a file)
:files (Editing a file)
show alternate file names (Using the argument list |argument-list|)
:ar[gs] (Using the argument list |argument-list|)
print the argument list, with the current file in "[]" (Using the argument list |argument-list|)
:all or :sall (Using the argument list |argument-list|)
open a window for every file in the arg list (Using the argument list |argument-list|)
:wn[ext][!] (Using the argument list |argument-list|)
write file and edit next file (Using the argument list |argument-list|)
:wn[ext][!] {file} (Using the argument list |argument-list|)
write to {file} and edit next file, unless {file} exists; With !, overwrite existing file (Using the argument list |argument-list|)
:wN[ext][!] [file] (Using the argument list |argument-list|)
write file and edit previous file (Writing and quitting)
:[range]w[rite][!] (Writing and quitting)
write to the current file (Writing and quitting)
:[range]w[rite] {file} (Writing and quitting)
write to {file}, unless it already exists (Writing and quitting)
:[range]w[rite]! {file} (Writing and quitting)
write to {file}. Overwrite an existing file (Writing and quitting)
:[range]w[rite][!] >> (Writing and quitting)
append to the current file (Writing and quitting)
:[range]w[rite][!] >> {file} (Writing and quitting)
append to {file} (Writing and quitting)
:[range]w[rite] !{cmd} (Writing and quitting)
execute {cmd} with [range] lines as standard input (Writing and quitting)
:[range]up[date][!] (Writing and quitting)
write to current file if modified (Writing and quitting)
:wa[ll][!] (Writing and quitting)
write all changed buffers (Writing and quitting)
:q[uit] (Writing and quitting)
quit current buffer, unless changes have been made; Exit Vim when there are no other non-help buffers (Writing and quitting)
:q[uit]! (Writing and quitting)
quit current buffer always, discard any changes. Exit Vim when there are no other non-help buffers (Writing and quitting)
:qa[ll] (Writing and quitting)
exit Vim, unless changes have been made (Writing and quitting)
:qa[ll]! (Writing and quitting)
exit Vim always, discard any changes (Writing and quitting)
:cq (Writing and quitting)
quit without writing and return error code (Writing and quitting)
:wq[!] (Writing and quitting)
write the current file and exit (Writing and quitting)
:wq[!] {file} (Writing and quitting)
write to {file} and exit (Writing and quitting)
:x[it][!] [file] (Writing and quitting)
like ":wq" but write only when changes have been made (Writing and quitting)
ZZ (Writing and quitting)
same as ":x" (Writing and quitting)
ZQ (Writing and quitting)
same as ":q!" (Writing and quitting)
:xa[ll][!] or :wqall[!] (Writing and quitting)
write all changed buffers and exit (Writing and quitting)
:st[op][!] (Writing and quitting)
suspend Vim or start new shell; if 'aw' option is set and [!] not given write the buffer (Writing and quitting)
CTRL-Z (Writing and quitting)
same as ":stop" (Multi-window commands)
CTRL-W s or :split (Multi-window commands)
split window into two parts (Multi-window commands)
:split {file} (Multi-window commands)
split window and edit {file} in one of them (Multi-window commands)
:vsplit {file} (Multi-window commands)
same, but split vertically (Multi-window commands)
:vertical {cmd} (Multi-window commands)
make {cmd} split vertically (Multi-window commands)
:sf[ind] {file} (Multi-window commands)
split window, find {file} in 'path' and edit it (Multi-window commands)
:terminal {cmd} (Multi-window commands)
open a terminal window (Multi-window commands)
CTRL-W ] (Multi-window commands)
split window and jump to tag under cursor (Multi-window commands)
CTRL-W f (Multi-window commands)
split window and edit file name under the cursor (Multi-window commands)
CTRL-W ^ (Multi-window commands)
split window and edit alternate file (Multi-window commands)
CTRL-W n or :new (Multi-window commands)
create new empty window (Multi-window commands)
CTRL-W q or :q[uit] (Multi-window commands)
quit editing and close window (Multi-window commands)
CTRL-W c or :clo[se] (Multi-window commands)
make buffer hidden and close window (Multi-window commands)
CTRL-W o or :on[ly] (Multi-window commands)
make current window only one on the screen (Multi-window commands)
CTRL-W j (Multi-window commands)
move cursor to window below (Multi-window commands)
CTRL-W k (Multi-window commands)
move cursor to window above (Multi-window commands)
CTRL-W CTRL-W (Multi-window commands)
move cursor to window below (wrap) (Multi-window commands)
CTRL-W W (Multi-window commands)
move cursor to window above (wrap) (Multi-window commands)
CTRL-W t (Multi-window commands)
move cursor to top window (Multi-window commands)
CTRL-W b (Multi-window commands)
move cursor to bottom window (Multi-window commands)
CTRL-W p (Multi-window commands)
move cursor to previous active window (Multi-window commands)
CTRL-W r (Multi-window commands)
rotate windows downwards (Multi-window commands)
CTRL-W R (Multi-window commands)
rotate windows upwards (Multi-window commands)
CTRL-W x (Multi-window commands)
exchange current window with next one (Multi-window commands)
CTRL-W = (Multi-window commands)
make all windows equal height & width (Multi-window commands)
CTRL-W - (Multi-window commands)
decrease current window height (Multi-window commands)
CTRL-W + (Multi-window commands)
increase current window height (Multi-window commands)
CTRL-W _ (Multi-window commands)
set current window height (default: very high) (Multi-window commands)
CTRL-W < (Multi-window commands)
decrease current window width (Multi-window commands)
CTRL-W > (Multi-window commands)
increase current window width (Multi-window commands)
CTRL-W | (Multi-window commands)
set current window width (default: widest possible) (Buffer list commands)
:buffers or :files (Buffer list commands)
list all known buffer and file names (Buffer list commands)
:ball (Buffer list commands)
or :sball edit all args/buffers (Buffer list commands)
:unhide or :sunhide (Buffer list commands)
edit all loaded buffers (Buffer list commands)
:badd {fname} (Buffer list commands)
add file name {fname} to the list (Buffer list commands)
:bunload[!] [N] (Buffer list commands)
unload buffer [N] from memory (Buffer list commands)
:bdelete[!] [N] (Buffer list commands)
unload buffer [N] and delete it from the buffer list (Syntax Highlighting)
:syntax on (Syntax Highlighting)
start using syntax highlighting (Syntax Highlighting)
:syntax off (Syntax Highlighting)
stop using syntax highlighting (Syntax Highlighting)
:syntax keyword {group-name} {keyword} .. (Syntax Highlighting)
add a syntax keyword item (Syntax Highlighting)
:syntax match {group-name} {pattern} ... (Syntax Highlighting)
add syntax match item (Syntax Highlighting)
:syntax region {group-name} {pattern} ... (Syntax Highlighting)
add syntax region item (Syntax Highlighting)
:syntax sync [ccomment | lines {N} | ...] (Syntax Highlighting)
tell syntax how to sync (Syntax Highlighting)
:syntax [list] (Syntax Highlighting)
list current syntax items (Syntax Highlighting)
:syntax clear (Syntax Highlighting)
clear all syntax info (Syntax Highlighting)
:highlight clear (Syntax Highlighting)
clear all highlight info (Syntax Highlighting)
:highlight {group-name} {key}={arg} .. (Syntax Highlighting)
set highlighting for {group-name} (Syntax Highlighting)
:filetype on (Syntax Highlighting)
switch on file type detection, without syntax highlighting (Syntax Highlighting)
:filetype plugin indent on (Syntax Highlighting)
switch on file type detection, with automatic indenting and settings (GUI commands)
:gui (GUI commands)
UNIX: start the GUI (GUI commands)
:gui {fname} .. (GUI commands)
idem, and edit {fname} .. (GUI commands)
:menu (GUI commands)
list all menus (GUI commands)
:menu {mpath} (GUI commands)
list menus starting with {mpath} (GUI commands)
:menu {mpath} {rhs} (GUI commands)
add menu {mpath}, giving {rhs} (GUI commands)
:menu {pri} {mpath} {rhs} (GUI commands)
idem, with priorities {pri} (GUI commands)
:menu ToolBar.{name} {rhs} (GUI commands)
add toolbar item, giving {rhs} (GUI commands)
:tmenu {mpath} {text} (GUI commands)
add tooltip to menu {mpath} (GUI commands)
:unmenu {mpath} (GUI commands)
remove menu {mpath} (Folding)
zf{motion} (Folding)
operator: Define a fold manually (Folding)
:{range}fold (Folding)
define a fold for {range} lines (Folding)
zd (Folding)
delete one fold under the cursor (Folding)
zD (Folding)
delete all folds under the cursor (Folding)
zo (Folding)
open one fold under the cursor (Folding)
zO (Folding)
open all folds under the cursor (Folding)
zc (Folding)
close one fold under the cursor (Folding)
zC (Folding)
close all folds under the cursor (Folding)
zm (Folding)
fold more: decrease 'foldlevel' (Folding)
zM (Folding)
close all folds: make 'foldlevel' zero (Folding)
zr (Folding)
reduce folding: increase 'foldlevel' (Folding)
zR (Folding)
open all folds: make 'foldlevel' max. (Folding)
zn (Folding)
fold none: reset 'foldenable' (Folding)
zN (Folding)
fold normal set 'foldenable' (Folding)
zi (Folding)
invert 'foldenable'