1, the command line mode: Just enter the VIM mode, the mode can move the cursor to browse, you can delete the whole row, etc., but unable to edit the text, the mode of the function keys are:
(1) YY: Copy the current cursor in the row
(2) [N]yy:n is a number that duplicates the n rows at the beginning of the current cursor
(3) P: Paste the copied content to the next line of the cursor
(4) DD: Deletes the current cursor in the row
(5) [N]DD: Delete n rows starting at the current cursor line
(6)/name: Search for a string named "name" after the cursor
(7) G: Cursor moves to end of file (note is uppercase)
(8) U: cancels the previous action (note is lowercase)
(9) Skip to the specified line: line number +g
(10) Jump to the first line of the first character: GG
(11) Skip to the end of the current line: $
(12) Skip to the beginning of the current line: 0 (0)
2, enter "I" in the command line mode, enter the insertion mode, press "ESC" to return to the command line mode;
3, the bottom line mode: When vim processing command line mode, by typing ": (colon)" into the bottom row mode, the user can do file saving or exit operation, you can also set the editing environment, such as looking for strings, listing line numbers, the function keys are as follows:
(1): W Save
(2): Q Quit Vim (the system will prompt to save the changes)
(3): q! Forced exit (do not save for modification)
(4): Exit after Wq save
(5): w [filename] file saved as filename (there is a space between W and filename)
(6): Set NU display line number
(7): Set Nonu Cancel line number
(8):/String to find
001 Embedded Childhood VIM common commands