Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Next: , Previous: Moving Point, Up: Basic


8.3 Erasing Text

<DEL>
Delete the character before point (delete-backward-char).
C-d
Delete the character after point (delete-char).
<DELETE>
<BACKSPACE>
One of these keys, whichever is the large key above the <RET> or <ENTER> key, deletes the character before point, like <DEL>. If that is <BACKSPACE>, and your keyboard also has <DELETE>, then <DELETE> deletes forwards, like C-d.
C-k
Kill to the end of the line (kill-line).
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).

You already know about the <DEL> key which deletes the character before point (that is, before the cursor). Another key, Control-d (C-d for short), deletes the character after point (that is, the character that the cursor is on). This shifts the rest of the text on the line to the left. If you type C-d at the end of a line, it joins together that line and the next line.

To erase a larger amount of text, use the C-k key, which kills a line at a time. If you type C-k at the beginning or middle of a line, it kills all the text up to the end of the line. If you type C-k at the end of a line, it joins that line and the next line.

See Killing, for more flexible ways of killing text.


 
 
  Published under the terms of the GNU General Public License Design by Interspire