Next: , Previous: , Up: Edit   [Contents][Index]

3.3 Erasing Text


If you press DEL i.e. the delete key, it will delete the character before the cursor (delete-backward-char).


This will delete the character after the cursor (delete-char).


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.


Kill forward to the end of the next word (kill-word).


Kill back to the beginning of the previous word (backward-kill-word).


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.