Edit Commands
Recall that c, d, and y are the basic editing operators.
Changing and deleting text
The following table is not exhaustive, but illustrates the most common operations.
|
|
Change word. |
|
|
Change line. |
|
|
Change text from current position to end-of-line. |
|
|
Same as |
|
|
Delete current line. |
|
|
Delete num lines. |
|
|
Delete text from current position to end-of-line. |
|
|
Same as |
|
|
Delete a word. |
|
|
Delete up to next paragraph. |
|
|
Delete back to beginning of line. |
|
|
Delete up to first occurrence of pattern. |
|
|
Delete up to next occurrence of pattern. |
|
|
Delete up to and including x on current line. |
|
|
Delete up to (but not including) x on current line. |
|
|
Delete up to last line on screen. |
|
|
Delete to end of file. |
|
|
Reformat current paragraph to
|
|
|
Switch case of word. {vim} |
|
|
Change word to lowercase. {vim} |
|
|
Change word to uppercase. {vim} |
|
|
Insert last deleted or yanked text after cursor. |
|
|
Same as |
|
|
Same as |
|
|
Same as |
|
|
Insert last deleted or yanked text before cursor. |
|
|
Same as |
|
|
Replace character with x. |
|
|
Replace with new text (overwrite), beginning at cursor. ESCAPE ends replace mode. |
|
|
Substitute character. |
|
|
Substitute ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access