VI Usage Tips (2): Copy, Paste, Delete, Block Editing, RedoUndo

xiaoxiao2021-03-06  91

1. Copy and Paste YY: COPY Cursor The line NYY: COPY N line YW: COPY Cursor The word NYW: COPY Cursor where N words (not necessarily the same line) Y $: COPY Cursor location To the end of the row ($ is the mark at the end) NY $: N row after the Copy cursor (including the current line, current line = Y $) P: Paste in the cursor location P: ---------------- -------------------------- Left 2. Delete, and COPY Similar DD: DELETE CURRENT LINE NDD: DELETE N LINE DW: DELETE CURRENT WORD NDW : Delete N Word D $: delete to the end of line. ND $: delete n line. (Current line = d $) x: delete one character (whether ASCII or unicode) Nx: delete n characters.3. Block Edit In command mode, enter V into block editing state a. Move cursor selection operation Fast B. C (CUT), Y (COPY) C. P or p.4. Undo / Redo U: UNDO U: Cancel the latest line Change CRTL R: Redo E !: Abandon all changes, re-edit it.

转载请注明原文地址:https://www.9cbs.com/read-105350.html

New Post(0)