Vim Language Summary
An alphabetical list of all vim commands
For a similar list, see :help quickref (which is missing a few things, such as g+g-)
Normal Mode Commands, operators, motion (Mostly single characters)
COMMAND OPERATOR MOTION
a A Append at char/eol
C c Change to eol/motion
D d Delete to EOL/motion
i I Insert at char/bol
J Join lines
K Keyword lookup in vim help
m Set mark
o O Open INPUT below/above
p P Put yanked text below/above
q Macros
Q Enter ex mode
r R Replace insert/overwrite
s Substitute to INPUT mode
S Substitute lines
u U Undo change/all changes to line
v V ^V Enter visual mode: char, line, block
x X Delete under and after/before cursor
Y y Yank line/to motion
~ Change case of character and go to next char (if tildeop not set)
~ Change case to motion [if tildeop is set)
g~ Change case to motion [if tildeop is set)
> < Shift to motion
= Indent to motion
b B Back a word/WORD
e E End of word/WORD
f F Find forward/backward in line
G File info
h H Cursor Left/to High in file
j Cursor down
k Cursor up
l L Cursor right/to Low in file
M Curosr to middle line of file
n N Repeat previous search/opposite direction
t T to character in line / backwards
w W Forward a word/WORD
Normal Mode Commands, operators, motion/text objects (Mostly two characters)
COMMAND OPERATOR MOTION TEXT OBJECT
gw Format lines
g~ Change case
gd gD Go to declaration (from func or file start)
ge Backward to end of word
gg Go to Top of file
go Go to byte
'R Go to mark R
iw aw inner/a word (exclude/include delimiter)
iW aW
ip ap paragraph
is as sentence
i( a( ib ab block
i{ a{ iB aB Block
i[ a[
i< a<
i" a"
i' a'
i` a`
it at
mR Mark current location with mark R
ga Display ascii of current character
g8 Display hex byte(s) of current character (bytes in multibyte characters)
gb Go to bookmarked directory
g^g File info
gh gH g^H Enter Select mode
gi INPUT at previous location
gI INPUT col 0 ignoring tabs
gj Display characters up
gJ Join without adding spaces
gk Display characters up
gm Screenwidth right
gp Put (cursor after)
gq Format
gr gR Virtual replace
gs Go to Sleep
gt gT Go to tab n / backwards
gu gU
gv Remark visual selection
gV Avoid automatic reselection of selection
FOLD COMMANDS
zA open a closed fold or close an open fold recursively
zC close folds recursively
zD delete folds recursively
zE eliminate all folds
zF create a fold for N lines
zM set 'foldlevel' to zero
zN set 'foldenable'
zO open folds recursively
zR set 'foldlevel' to the deepest fold
zX re-apply 'foldlevel'
za open a closed fold, close an open fold
zc close a fold
zd delete a fold
zf{motion} create a fold for Nmove text
zi toggle 'foldenable'
zj 1 move to the start of the next fold
zk 1 move to the end of the previous fold
zm subtract one from 'foldlevel'
zn reset 'foldenable'
zo open fold
zr add one to 'foldlevel'
zv open enough folds to view the cursor line
zx re-apply 'foldlevel' and do "zv"
MOVE CURSOR COMMANDS
zb redraw, cursor line at bottom of window
zt redraw, cursor line at top of window
zz redraw, cursor line at center of window
z^ cursor on line N (default line above window), otherwise like "z-"
HORIZ SCROLL COMMANDS
ze when 'wrap' off scroll horiz,put cursor at end (right) of screen
zh when 'wrap' off scroll screen N characters to the right
zl when 'wrap' off scroll screen N characters to the left
zs when 'wrap' off scroll horiz,put cursor at start (left) of screen
z same as "zh"
z same as "zl"
SPELL COMMANDS (turn on with :set spell)
zg mark word as good spelled word
zw mark word as wrong (bad) spelled word
zW mark word as wrong (bad) spelled word
zG mark word as good spelled word
Normal Mode CTRL Commands
CTRL-G File info (gCTRL-G for more info)
CTRL-F Scroll forward 1 page - cursor to top of screen
CTRL-B Scroll backward 1 page - cursor to bottom of screen
CTRL-U Scroll window up half screen - cursor loc on screen same
CTRL-D Scroll window down half screen - cursor loc on screen same
CTRL-E Scroll window down - cursor stays on line, moves up on screen
CTRL-Y Scroll window up - cursor stays on line, moves down on screen
Visual Mode Operators for Char, Line, Block Visual Selections
Do all of these work for all three selections?
In select mode v, V, ^V either changes type if different or exits if same.
x Delete
d Delete
r. Replace with single character .
s Substitue with string
> < Shift
= Indent
~ Change case
g~ Change case
gu Change to upper case
gU Change to lower case
Operators for Input/Replace Mode
^C Esc Exit Insert/Replace Mode
^@ Insert previous and stop insert
CTRL-A Insert previously inserted text.
<BS> or CTRL-H Delete the character before the cursor
<Del> Delete the character under the cursor.
CTRL-W Delete the word before the cursor
CTRL-U Delete all entered characters in the current line
<Tab> or CTRL-I Insert a tab.
<NL> or CTRL-J Begin new line.
<CR> or CTRL-M Begin new line.
CTRL-K {char1} [char2] Enter digraph (see |digraphs|).
CTRL-N Find next keyword (see |i_CTRL-N|).
CTRL-P Find previous keyword (see |i_CTRL-P|).
CTRL-R {0-9a-z"%#*+:.-=} Insert the contents of a register.
'"' the unnamed register, has text of the last delete or yank
'%' the current file name
'#' the alternate file name
'*' the clipboard contents (X11: primary selection)
'+' the clipboard contents
'/' the last search pattern
':' the last command-line
'.' the last inserted text
'-' the last small (less than a line) delete
'=' the expression register: prompted to enter an expression
CTRL-R CTRL-R {0-9a-z"%#*+/:.-=}Literally insert register contents.
CTRL-R CTRL-O {0-9a-z"%#*+/:.-=} Literally insert reg w/o ai
CTRL-R CTRL-P {0-9a-z"%#*+/:.-=} Literally insert reg w/ ai
CTRL-T Insert one shiftwidth of indent at start of the current line.
CTRL-D Delete one shiftwidth of indent at the start of current line.
0 CTRL-D Delete all indent in the current line.
^ CTRL-D Delete all indent in the current line.
CTRL-V Insert next non-digit literally.
CTRL-Q Same as CTRL-V.
CTRL-X Enter CTRL-X mode. For completion or scrolling
CTRL-E Insert the character which is below the cursor.
CTRL-Y Insert the character which is above the cursor.
CTRL-_ Switch between RL and LR languages, as follows:
CTRL-^ Toggle the use of typing language characters.
CTRL-] Trigger abbreviation, without inserting a character.
Toggle between Insert and Replace mode.
Command line commands
:...
/...
Options
See :options
Or See options section of :help quickref
Lists of Things
:set
:set all
:set thing
:verbose set thing
:options
:scriptnames
:version
:map
:com[mand]
:ab[breviate}
How to save results into buffer:
Command Line Commands
...