Skip to content

Instantly share code, notes, and snippets.

@dahu
Last active December 7, 2023 23:55
Show Gist options
  • Star 55 You must be signed in to star a gist
  • Fork 13 You must be signed in to fork a gist
  • Save dahu/3986511 to your computer and use it in GitHub Desktop.
Save dahu/3986511 to your computer and use it in GitHub Desktop.
Vim Motions
Large Object Motions:
(
)
{
}
[[
[]
][
]]
[m
[M
]m
]M
[(
])
[{
]}
Word Motions:
w
W
e
E
b
B
ge
gE
Line Motions:
H
L
M
j
k
gg
G
-
+
_
Display Line Motions:
gj
gk
Column Motions:
h (or <Left> or <ctrl-h> or <BS>)
l (or <Right> or <Space>)
^
$ (or <End>)
|
0
<Home>
Display Column Motions:
g^
g$ (or g<End>)
g_
g0 (or g<Home>)
gm
Search Motions:
/
?
n
N
#
*
Find Motions:
F
f
T
t
;
,
Changelist Motions:
g;
g,
Extended Matchit Motions:
%
g%
Jump Motions:
`
'
ctrl-o
ctrl-i (or Tab)
Buffer Motions:
{count}%
{count}go
Some Additional Commands that move the cursor:
Commence Editing:
a
A
I
gI
o
O
Scroll Cursor:
z<CR>
zt
z.
zz
z-
zb
Scroll Window:
ctrl-y
ctrl-e
ctrl-u
ctrl-d
ctrl-b (or PageUp)
ctrl-f (or PageDown)
z^
z+
Tag Jumps:
ctrl-]
g]
g ctrl-]
ctrl-t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment