Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save khalidchawtany/bba7c5e3c449aeb03546f1bcbc7b2d2a to your computer and use it in GitHub Desktop.
Save khalidchawtany/bba7c5e3c449aeb03546f1bcbc7b2d2a 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