Vim
Vim
Vim is a highly configurable text editor. However, it has a steep learning curve. The objective of this documentation is to show you the essential commands to get started.
First, Vim has two basic modes: insert mode (press i), which lets you write text as if in a normal text editor; normal mode (press Esc) lets you navigate and manipulate text efficiently.
You use the keys h, j, k, and l to move the cursor. They are assigned to the following operations:
| Key | Action |
|---|---|
h | Cursor goes to the left |
j | Cursor goes down |
k | Cursor goes up |
l | Cursor goes to the right |
To navigate the text, you use the w, b, and e keys. They are assigned as follows:
| Key | Action |
|---|---|
w | Moves to the start of the next word |
b | Moves to the end of the word |
e | Moves at the start of the word |
Another important aspect of Vim is that you can multiply commands. For example, you will move the cursor to the right five times if you hit 5 and then l. Or even, 10 + i + - + Esc will add ten times the - character: ----------.
Finally, there are some commands on Vim that you need to know to edit some files. These commands are only available on Normal mode:
| Command | Action |
|---|---|
:w | Save changes |
:q! | Exit Vim without saving changes |
:wq | Save changes and exit |
These commands are the bare minimum you need to edit a file. If you want to learn more commands and how to use Vim, check this website.
Updated 6 months ago
