Text modification edit commands
Text-modification edit commands modify the line as follows:
Item | Description |
---|---|
a | Enters the input mode and enters text after the current character. |
A | Appends text to the end of the line. Equivalent to the $a command. |
[Count]cMotion | |
c[Count]Motion | Deletes the current character through the character to which the Motion parameter specifies to move the cursor, and enters input mode. If the value of the Motion parameter is c, the entire line is deleted and the input mode is entered. |
C | Deletes the current character through the end of the line and enters input mode. Equivalent to the c$ command. |
S | Equivalent to the cc command. |
D | Deletes the current character through the end of line. Equivalent to the d$ command. |
Item | Description |
---|---|
[Count]dMotion d[Count]Motion |
Deletes the current character up to and including the character specified by the Motion parameter. If Motion is d, the entire line is deleted. |
i | Enters the input mode and inserts text before the current character. |
I | Inserts text before the beginning of the line. Equivalent to the 0i command. |
[Count]P | Places the previous text modification before the cursor. |
[Count]p | Places the previous text modification after the cursor. |
R | Enters the input mode and types over the characters on the screen. |
[Count]rc | Replaces the number of characters specified by the Count parameter, starting at the current cursor position, with the characters specified by the c parameter. This command also advances the cursor after the characters are replaced. |
[Count]x | Deletes the current character. |
[Count]X | Deletes the preceding character. |
[Count]. | Repeats the previous text-modification command. |
[Count]~ | Inverts the case of the number of characters specified by the Count parameter, starting at the current cursor position, and advances the cursor. |
[Count]_ | Appends the word specified by the Count parameter of the previous command and enters input mode. The last word is used if the Count parameter is omitted. |
* | Appends an asterisk (* ) to the current
word and attempts file name substitution. If no match is found, it rings the
bell. Otherwise, the word is replaced by the matching pattern and input mode
is entered. |
\ | File name completion. Replaces the current word with the
longest common prefix of all file names matching the current word with an
asterisk (* ) appended. If the match is unique, a slash / is
appended if the file is a directory. A space is appended if the file is not
a directory. |