56. Advanced Text Editor - Vim's Visual and Input Mode
Contents
In addition to the last line mode and edit mode, vim also provides us with two other modes: view mode for copying, pasting, deleting selected content, and insert mode to add and delete text.
Visual Mode
Here are some commands to switch to visual mode from edit mode:
Option | Meaning |
---|---|
v | The minimum select unit is character. |
V | The minimum select unit is line. |
Here are some commands for visual mode:
Option | Meaning |
---|---|
y | Copy from the selected portion. |
p | Paste to the selected portion. |
d | Delete the selected portion. |
c | Delete the selected portion and switch to insert mode. |
Insert Mode
Here are some commands to switch to insert mode from edit mode:
Option | Meaning |
---|---|
i | Locate cursor to the current character’s left character. |
I | Locate cursor to the current line’s first character. |
a | Locate cursor to the current character’s right character. |
A | Locate cursor to the current line’s last character. |
o | Locate cursor to the previous line. |
O | Locate cursor to the next line. |
References VIM Documentation
Author Dong Chen
LastMod Thu Mar 28 2019