Start with VsCodeVim marketplace extension.
To return to normal mode:
esc
ctrl+c
ctrl+[
Otherwise, the commands follow a grammar:
<valid action> = <command> <locator> <motion> | <locator> <motion> | <motion> <direction>
| <locator> <repeat>? | <search>
<command> = d | c | y | v | > | <
<search> = / <search term> <enter> <searchresult>
<searchresult> = n <searchresult> | N <searchresult> | n | N
<motion> = h | j | k | l
<direction> = $ | _
<locator> = <integer>? f <character> | <integer>? t <character>
| <integer>? F <character> | <integer>? T <character>
| <integer>
<repeat> = ; | ,
<character number> = position on the line
<character> = an ascii character
KeyBind | Command |
---|---|
x |
delete a character |
h |
cursor left |
j |
cursor down |
k |
cursor up |
l |
cursor right |
w |
skip one word forward |
b |
skip one word backward |
d |
delete (repeat for single line delete) |
< |
De-dent line |
> |
Indent line |
c |
? |
y |
yank |
p |
paste |
_ |
Goes to the beginning of the line |
$ |
Goes to the end of the line |
0 |
Goes to the 0th item of the line |
; |
Next match |
, |
Previous match |
/ |
Initiate search |
n |
Next search match |
N |
Previous search match |
f + <character> |
find forward from cursor on to next |
t + <character> |
find forward from cursor next to to next |
F + <character> |
find backward from cursor on to next |
T + <character> |
find backward from cursor next to to next |
↑
k Hint: The h key is at the left and moves left.
← h l → The l key is at the right and moves right.
j The j key looks like a down arrow.
↓
i
to enter the mode before the cursor.
a
to enter the mode after the cursor.
O
to enter the mode on a new line before the cursor.
o
to enter the mode on a new line after the cursor.
v
to enter the mode.
shift + v
to enter an enforced multiline select. (visual line mode)
:
/
search term
enter
n
for next occurenceN
for previous occurence
A tag
is an identifier that appears in a tags file. A tags file must be generated before it can be used, but once one exists, it'll keep track of stuff in a file. For instance in C
function names will be tags. You will be able to advance between tags with ctrl-t
for previous tag
.