Vim is the most common text editor on Linux systems, and almost any Linux distribution will be installed by default. Yes, it's a free software. It's good to learn the basic operation commands of the Vim editor, which can make your work more effective and make you more handsome.
Three modes are set in the VIM Editor---------Command mode, edit mode, and last line mode.
- Command mode: Control the cursor movement, can copy, paste, delete and find the text and other work
- Edit mode: Normal text entry
- Last-line mode: Save or exit the document, and set the editing environment
The VIM editor enters the command mode by default, and you need to switch to edit mode before you write the document, and each time you finish writing the document, you need to return to the command mode before entering the last line mode to save or exit the document.
Special note: In the VIM editor, you cannot switch directly from edit mode to last-line mode.
In command mode, you can switch from command mode to edit mode using a, I, o three keys, respectively:
1) A: Insert after the current cursor position
2) A: Insert at the end of the line at which the cursor is currently located
3) I: Insert before the current cursor position
4) I: Insert at the beginning of the current cursor
5) O: Insert the next line in the current line of the cursor (add a row)
6) O: Insert the previous line of the cursor in the current row (add a row)
Commands commonly used in command mode
The last-line mode is primarily used to save or exit files, as well as to set the working environment of the Vim editor, and allows the user to execute external linux commands or jump to a specific number of lines in the document being written. To switch to the last line mode, enter a colon in the command mode: Yes.
Commands commonly used in last-line mode
Well, today is a simple introduction to the basic operation of the command, more quick commands waiting for you to learn to explore.
VIM Basic Operation command