Vim Simple Introduction Notes
in Note with 0 comment
Vim Simple Introduction Notes
in Note with 0 comment

Three modes

Move operation

Exit Editor

among ! It means mandatory

Copy Paste

Copy Multiple Lines

In normal mode, move the cursor to the line to be copied

Press p paste

Copy Section

In normal mode, press v Move the cursor to select the part to be copied, and then press d Cut or press y Copy, and then press p paste

delete

Undo Redo

Press in normal mode u To undo, press ctrl+r To redo

Comments and cancellations

notes

  1. Press ctrl+v Enter visualization mode
  2. Move the cursor to select the line to be commented
  3. Press I , and then enter a comment such as #
  4. Press Esc Return to normal mode

cancel

  1. Press ctrl+v Enter visualization mode
  2. Select the comment to delete
  3. Press d or x delete

search

Input in general mode / Then followed by the word to be searched
n and N : Display next and previous search results

set number

Input in command mode set number , then you can see the line number

Responses