vi / vim shortcuts

1, copy the current row [yy], the current copy down the line five lines [5yy], [p] and paste

2, [dd] delete the current line, the current line delete rows down [5] 5dd

3. Find a word in the file, enter [/ keywords] command-line mode, enter a search, press [n] to find the next

4, line number [file: set nu], [cancel file line number: set nonu]

5, edit the file, use shortcuts to reach the last line of the document under [G] and [gg] most the first line, the normal mode execution

6, in the input file, and then perform undo actions, enter the normal mode [u]

7, edit files, position the cursor to the first few lines of the specified row [] [] shift + g

 

Guess you like

Origin www.cnblogs.com/az4215/p/11375169.html