We often use the vim editor when editing text in our daily work. Although vim is powerful and almost omnipotent, it is difficult to get started when we get used to word, in addition, it is not easy to remember frequently-used commands. I will write down the frequently-used command list for you to quickly query and use. You are welcome to supplement and perfect it. perfection is a habit !!! 1. ctrl + f flip down 2. ctrl + B flip up 3. g. Locate the last line of text. 4. gg locates the first line of text 5. shift + % matching brackets 6. save ZZ and exit 7. ZQ does not save and exits 8.: set nu open row serial number 9.: set nonu close row serial number 10.: % s # ***** # g Global replacement string 11. ctrl + v column editing mode. H, select k and l on the left j and select visual block on the right. The direction keys can also be reflected. x deletes the selected content. d deletes the selected content, r + replacement character is paste example r + p12.u undo the last operation www.2cto.com 13. shift + d Delete to the end of the row 14.d$ Delete to the end of the row 14. d ^ Delete to the beginning of the line 14.D delete all content after the cursor 14. :., $ d colon + one point + one comma + one $ + one d and then press enter to delete all content below the current row 14.: 1, $ d colon + number 1 + one comma + one $ + one d then press enter to delete all rows below 1st 14.: 2, $ d colon + number 2 + one comma + one $ + one d then press enter to delete all rows below 2nd 14. /kernel \ c ignore the case to find the kernel string, \ c is to ignore the case to find 15.yy copy the row where the cursor is located 16. small p paste the next row of the current row 17. big P paste the previous line of the current row by superdebug