Search 283 motions, operators and commands in plain English. The pad runs real Vim keybindings, so what you practise is what you get.
Move the cursor down one line
283/283
:h[elp] keyword
Open help for keyword
:sav[eas] file
Save file as
:clo[se]
Close current pane
:ter[minal]
Open a terminal window
K
Open man page for word under the cursor
:set number
Turn on line numbers
:set nonumber
Turn off line numbers
:set relativenumber
Turn on relative line numbers
:set norelativenumber
Turn off relative line numbers
:set ic / :set noic
Toggle case-insensitive search
:set hlsearch
Highlight all search matches
:set incsearch
Show matches as you type
vimtutor
Run the built-in interactive Vim tutorial from the shell
vim file.txt
Open a file
vim
Open Vim with an empty buffer
vim file1 file2
Open multiple files as buffers
vim +42 file
Open file at line 42
vim +/word file
Open file and search for word
Prefix a movement with a count to repeat it. 4j moves down 4 lines.
h
Move cursor left
j
Move cursor down
k
Move cursor up
l
Move cursor right
gj
Move cursor down in wrapped lines
gk
Move cursor up in wrapped lines
H
Move to top of screen
M
Move to middle of screen
L
Move to bottom of screen
w
Jump forward to the start of a word
W
Jump forward to the start of a WORD
e
Jump forward to the end of a word
E
Jump forward to the end of a WORD
b
Jump backward to the start of a word
B
Jump backward to the start of a WORD
ge
Jump backward to the end of a word
gE
Jump backward to the end of a WORD
%
Move to matching character: (), {}, []
0
Jump to the start of the line
^
Jump to the first non-blank character of the line
$
Jump to the end of the line
g_
Jump to the last non-blank character of the line
gg
Go to the first line of the document
G
Go to the last line of the document
5gg / 5G
Go to line 5
gd
Move to local declaration
gD
Move to global declaration
gf
Open the file under the cursor
[[ / ]]
Jump to previous or next section
fx
Jump to next occurrence of character x
tx
Jump to just before next occurrence of x
Fx
Jump to previous occurrence of character x
Tx
Jump to just after previous occurrence of x
;
Repeat previous f, t, F, or T movement
,
Repeat previous f, t, F, or T movement backward
}
Jump to next paragraph
{
Jump to previous paragraph
zz
Center cursor on screen
zt
Position cursor at the top of the screen
zb
Position cursor at the bottom of the screen
Ctrl + e
Move screen down one line without moving cursor
Ctrl + y
Move screen up one line without moving cursor
Ctrl + b
Move screen up one page
Ctrl + f
Move screen down one page
Ctrl + d
Move cursor and screen down half a page
Ctrl + u
Move cursor and screen up half a page
i
Insert before the cursor
I
Insert at the beginning of the line
a
Insert after the cursor
A
Insert at the end of the line
o
Open a new line below the current line
O
Open a new line above the current line
ea
Insert at the end of the word
Ctrl + h
Delete the character before the cursor
Ctrl + w
Delete word before the cursor
Ctrl + j
Add a line break at the cursor position
Ctrl + t
Indent line one shiftwidth
De-indent line one shiftwidth
Ctrl + n
Insert next auto-completion match
Ctrl + p
Insert previous auto-completion match
Ctrl + rx
Insert the contents of register x
Ctrl + ox
Temporarily enter normal mode for command x
Esc / Ctrl + c
Exit insert mode
r
Replace a single character
R
Replace characters until Esc is pressed
J
Join line below with one space in between
gJ
Join line below without a space
gwip
Reflow paragraph
g~
Switch case up to motion
gu
Change to lowercase up to motion
gU
Change to uppercase up to motion
cc
Change entire line
c$ / C
Change to the end of the line
ciw
Change entire word
cw / ce
Change to the end of the word
s
Delete character and substitute text
S
Delete line and substitute text, same as cc
xp
Transpose two letters
gq
Reformat selected lines
Ctrl + a
Increment number under cursor
Ctrl + x
Decrement number under cursor
:sort
Sort lines alphabetically
:sort!
Sort lines in reverse alphabetical order
:sort u
Sort lines and remove duplicates
u
Undo
U
Restore last changed line
Ctrl + r
Redo
5u
Undo last 5 changes
:earlier 5m
Go back to the state from 5 minutes ago
:later 5m
Go forward 5 minutes in the undo history
:undolist
Show the full undo tree
.
Repeat last command
v
Start visual mode, then issue a command such as y
V
Start linewise visual mode
Move to other end of marked area
Ctrl + v
Start visual block mode
Move to other corner of block
aw
Mark a word
ab
A block with ()
aB
A block with {}
at
A block with <> tags
ib
Inner block with ()
iB
Inner block with {}
it
Inner block with <> tags
ci" / di" / yi"
Change, delete, or yank text inside double quotes
ci( / di( / yi(
Change, delete, or yank text inside ()
gv
Re-select the previous visual selection
Exit visual mode
>
Shift text right
<
Shift text left
y
Yank marked text
d
Delete marked text
~
Switch case
Change marked text to lowercase
Change marked text to uppercase
:reg[isters]
Show registers content
"xy
Yank into register x
"xp
Paste contents of register x
"+y
Yank into the system clipboard register
"+p
Paste from the system clipboard register
"0
Last yank
""
Unnamed register, last delete or yank
"%
Current file name
"#
Alternate file name
"*
Clipboard contents (X11 primary)
"+
Clipboard contents (X11 clipboard)
"/
Last search pattern
":
Last command-line
".
Last inserted text
"-
Last small (less than a line) delete
"=
Expression register
"_
Black hole register
:marks
List all marks
ma
Set current position as mark A
`a
Jump to position of mark A
y`a
Yank text to position of mark A
`0
Go to the position where Vim was previously exited
`"
Go to the position when last editing this file
`.
Go to the position of the last change in this file
``
Go to the position before the last jump
:ju[mps]
List of jumps
Ctrl + i
Go to newer position in jump list
Ctrl + o
Go to older position in jump list
:changes
List of changes
g,
Go to newer position in change list
g;
Go to older position in change list
Ctrl + ]
Jump to the tag under cursor
Jump back from tag
qa
Record macro a
q
Stop recording macro
@a
Run macro a
@@
Rerun last run macro
yy
Yank a line
2yy
Yank 2 lines
yw
Yank from cursor to start of next word
yiw
Yank word under the cursor
yaw
Yank word under the cursor and surrounding space
y$ / Y
Yank to end of line
y0
Yank from cursor to start of line
d0
Delete from cursor to start of line
"0p
Paste from the yank register, unaffected by later deletes
p
Put clipboard after cursor
P
Put clipboard before cursor
gp
Put after cursor and leave cursor after the new text
gP
Put before cursor and leave cursor after the new text
dd
Delete a line
2dd
Delete 2 lines
dw
Delete from cursor to start of next word
diw
Delete word under the cursor
daw
Delete word under the cursor and surrounding space
df*
Delete until *
:3,5d
Delete lines 3-5
:g/{pattern}/d
Delete all lines containing pattern
:g!/{pattern}/d
Delete all lines not containing pattern
d$ / D
Delete to end of line
x
Delete character
>>
<<
>%
Indent a block with () or {} (cursor on brace)
<%
De-indent a block with () or {} (cursor on brace)
>ib
Indent inner block with ()
>at
Indent a block with <> tags
3==
Re-indent 3 lines
=%
Re-indent a block with () or {} (cursor on brace)
=iB
Re-indent inner block with {}
gg=G
Re-indent entire buffer
]p
Paste and adjust indent to current line
:w
Write the file, but do not exit
:w !sudo tee %
Write the current file using sudo
:wq / :x / ZZ
Write and quit
:q
Quit (fails if there are unsaved changes)
:q! / ZQ
Quit and throw away unsaved changes
:wqa
Write and quit on all tabs
/pattern
Search forward for pattern
?pattern
Search backward for pattern
\vpattern
Very magic pattern: non-alphanumeric characters are treated as regex
n
Repeat search in same direction
N
Repeat search in opposite direction
:%s/old/new/g
Replace all old with new throughout the file
:%s/old/new/gc
Replace all occurrences with confirmation
:5,10s/old/new/g
Replace all occurrences in lines 5-10
*
Search forward for word under cursor
#
Search backward for word under cursor
:noh[lsearch]
Remove highlighting of search matches
:vim[grep] /pattern/ {file}
Search for pattern in multiple files
:cn[ext]
Jump to the next match
:cp[revious]
Jump to the previous match
:cope[n]
Open a window containing the list of matches
:ccl[ose]
Close the quickfix window
:set spell
Turn on spell checking
]s
Jump to next spelling error
[s
Jump to previous spelling error
z=
List possible replacements
:tabnew / :tabnew {file}
Open a file in a new tab
Ctrl + wT
Move the current split window into its own tab
gt / :tabn[ext]
Move to the next tab
gT / :tabp[revious]
Move to the previous tab
#gt
Move to tab number #
:tabm[ove] #
Move current tab to position # (indexed from 0)
:tabc[lose]
Close the current tab and all its windows
:tabo[nly]
Close all tabs except the current one
:tabdo {command}
Run command on all tabs
:e[dit] file
Edit a file in a new buffer
:bn[ext]
Go to the next buffer
:bp[revious]
Go to the previous buffer
:bd[elete]
Delete a buffer (close a file)
:b[uffer]#
Go to a buffer by index #
:b[uffer] file
Go to a buffer by file name
:ls / :buffers
List all open buffers
:sp[lit] file
Open a file and split window horizontally
:vs[plit] file
Open a file and split window vertically
:vert[ical] ba[ll]
Edit all buffers as vertical windows
:tab ba[ll]
Edit all buffers as tabs
:e!
Reload the current file, discarding changes
:r file
Insert the contents of file below the cursor
:r !cmd
Insert the output of shell command cmd below the cursor
Ctrl + ws
Split window horizontally
Ctrl + wv
Split window vertically
Ctrl + ww
Switch windows
Ctrl + wq
Quit a window
Ctrl + wx
Exchange current window with next one
Ctrl + w=
Make all windows equal height and width
Ctrl + wh
Move cursor to the left window
Ctrl + wl
Move cursor to the right window
Ctrl + wj
Move cursor to the window below
Ctrl + wk
Move cursor to the window above
Ctrl + wH
Make current window full height at far left
Ctrl + wL
Make current window full height at far right
Ctrl + wJ
Make current window full width at the very bottom
Ctrl + wK
Make current window full width at the very top
zf
Manually define a fold up to motion
zd
Delete fold under the cursor
za
Toggle fold under the cursor
zo
Open fold under the cursor
zc
Close fold under the cursor
zr
Reduce (open) all folds by one level
zm
Fold more (close) all folds by one level
zi
Toggle folding functionality
]c
Jump to start of next change
[c
Jump to start of previous change
do / :diffg[et]
Obtain diff (get changes from other file)
dp / :diffpu[t]
Put diff (push changes to other file)
:diffthis
Make current window part of the diff
:dif[fupdate]
Update diff
:diffo[ff]
Switch off diff mode for current window