Shortcut keys commonly used in the command mode of the 1.vim editor:
DD Delete (cut) the entire line where the cursor is located
5DD Delete (cut) 5 lines starting at the cursor
yy copies the entire line of the cursor
5yy copy 5 lines starting at the cursor
P Pastes previously deleted (DD) or copied (yy) data into the cursor
/String to search for the string in text from top to bottom
String to search for the string in text from bottom to top
n Displays the next string that the search command navigates to
N Displays the previous string to which the search command is anchored
U undo the last step operation
Common commands in the last-line mode of the 2.vim editor:
: W Save
: Q exit
: q! Force quit (Discard modifications to the text)
: wq! Force Save exit
: Set NU Displays line number
: Set Nonu does not display line numbers
: command to execute the command
: integer jumps to the row
Appendix:
1. In command mode and last-line mode, all shortcut key parameters are case-sensitive.
2. There is a colon ":" Before all the shortcut keys in the last-line mode.
That's how Linux should learn--command set (VIM editor)