Next: , Previous: Cursor Position, Up: Edit


3.3 Erasing Text

<DEL>
If you press <DEL> i.e. the delete key, it will delete the character before the cursor (delete-backward-char).
C-d
This will delete the character after the cursor (delete-char).
C-k
Kill to the end of the line (kill-line). If you kill the line by mistake you can yank or ‘paste’ it back by typing C-y. See Moving Text, for more information on yanking.
M-d
Kill forward to the end of the next word (kill-word).
M-<DEL>
Kill back to the beginning of the previous word (backward-kill-word).
M-k
Kill to the end of current sentence (kill-sentence).
M-z char
Kill up to next occurrence of char (zap-to-char). To use this command type M-z. You will see the following statement in the echo area :
          Zap to char:

Type any char and press the <RET> key. For example, if you type ‘p’ then the entire text starting from the position of the cursor until the first occurrence of ‘p’ is killed.