Commands to install Vim to be used within the terminal
sudo apt update
sudo apt install vim
If you use VSCode you can also use Vim via the Vim extension, and you can learn Vim via the Learn Vim extension. The Learn Vim book, and reference of Vim commands.
Guide on how to customize Vim keybindings within VSCode.
- Get into command mode:
esc
- Enter Insert mode:
i
- Enter Insert mode one character ahead:
a
- Enter Visual mode:
v
- Enter Command mode:
:
- Moving the cursor
- Move up:
k
- Move down:
j
- Move left:
h
- Move right:
l
- Move up:
- New line
- Below and enter insert mode:
o
- Above and enter insert mode:
O
- Below and enter insert mode:
- Search and replace
- Copy and paste guide
- Copy
- Everything to the right:
y$
- (Almost) everything to the left:
y^
- Entire line:
yy
- Word with its trailing whitespace:
yaw
- Word without its trailing whitespace:
yiw
yfx
ytx
- Everything to the right:
- Paste
P
"0p
paste last yanked string, instead of paste last cut string
- Cut
- Current line:
dd
- Everything to the right:
d$
- Current line:
- Copy
This is the mode used to highlight text, guide.
- Highlight current word:
viw