The vi Editor full name is Visual Interface, which is a visual interface, like Notepad in Windows, Vim is equivalent to an upgraded version of VI, which contains all the operations commands of VI, and what vim does with respect to VI:
1, VIM support multi-level revocation
2. Vim can be run across platforms
3. Vim support Syntax highlighting
4. Vim supports graphical interface
Mode of operation of the VIM editor:
Command mode, input mode, bottom line mode (can also be categorized into command mode)
Vim Common commands:
VIM ABC: Open ABC file, if not created
VIM + ABC: After entering the ABC file, the cursor is positioned to the last line, the first line is the default
VIM+3 ABC: Position the cursor to the third line after entering the ABC file
Vim +/admin ABC: After entering the ABC file, quickly navigate to the first page of the file where the admin word appears.
Vim AA bb cc: Create or open multiple files at once, by default entering into the first AA file, using the bottom line mode input in the AA file: N can switch to the next file, enter: N or: prev can switch to the previous file
Bottom-line mode common commands:
: W Save current file
: Q Exits the current file
:! Force exit of the current file
: LS lists all open files
: n switches to the latter file
: N switches to the previous file
: 15 cursor quickly navigates to 15 rows
/xxx the first occurrence of the XXX string from the cursor position to search backwards
? XXX starts searching forward from the cursor position the first time a XXX string appears
Command mode common commands:
H Cursor Shift Left
J Cursor Move Down
K Move Cursor up
L MOVE the cursor right
DD deletes the cursor in the row
o Insert a row below the line where the cursor is located and switch to input mode
YY the copy cursor is in the row
P (lowercase) paste below the line where the cursor is located
P (uppercase) is pasted above the line where the cursor is located
Linux Learning Notes--vi and VIM editor