vim practical guide (5): editing commands (delete, modify, copy, repeat) (3)-copy

1. Copy a single word-yw or yiw, yW or yiW

      Copy the word under the cursor to the vim register

2. Copy n words-nyw or nyW

3. Scope copy, copy the content in (), {}, "", []-yi(, yi{, yi", yi[

          Place the cursor in (), {}, "", [] and execute the corresponding command to copy the content contained in (), {}, "", []

4. Copy the entire line-yy

5. Copy multiple lines-nyy

 

6. Paste-p or np; P or nP (please understand the difference between p and P carefully)

      After completing the copy or delete, execute the p command to paste the copied or deleted content to the cursor position;

     Or paste n times, execute np, such as: 10p

 

Guess you like

Origin blog.csdn.net/lianshaohua/article/details/108750607