Type vimtutor
in your terminal or :h
. The documentation
is a good place to find out things vim can do that you
didn't know it could.
cd demo-app && npm run serve
to start the demo project.
vim <file>...
<Esc>
h
j
k
l
gg
G
and{line number}G
:q!
:wq
or:x
x
dw
d$
dd
i
andI
a
andA
r
andR
o
andO
c
andC
d
is an operatorw
,e
,$
,0
are motions- motions and operators take counts
- e.g.,
2w
or2dw
ord2w
- e.g.,
%
u
U
<C-r>
- some operators grab text into registers
p
y
:{range}s/{old}/{new}/{flags}
g
andc
flags
:{line number},{line number}
:%
:'<,'>
:!{ext command}
:w {file name}
:r {file name}
:r !{ext command}
:w !{ext command}
v
Vim is like a language. Operator/action followed by a motion or text object just like a sentence. Pro tip: always try to return to normal mode (hence the name).