diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2011-04-25 13:37:00 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:45:18 +0200 |
commit | 75a4a592e5ccda30715f93563d741b83e0dcf39e (patch) | |
tree | 502f745607e77a2c4386ad38d818ddcafe81489c /slackbook/html/emacs-basic-editing.html | |
parent | b76270bf9e6dd375e495fec92140a79a79415d27 (diff) | |
download | current-75a4a592e5ccda30715f93563d741b83e0dcf39e.tar.gz current-75a4a592e5ccda30715f93563d741b83e0dcf39e.tar.xz |
Slackware 13.37slackware-13.37
Mon Apr 25 13:37:00 UTC 2011
Slackware 13.37 x86_64 stable is released!
Thanks to everyone who pitched in on this release: the Slackware team,
the folks producing upstream code, and linuxquestions.org for providing
a great forum for collaboration and testing.
The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a
dual-sided
32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware
project by picking up a copy from store.slackware.com. We're taking
pre-orders now, and offer a discount if you sign up for a subscription.
As always, thanks to the Slackware community for testing, suggestions,
and feedback. :-)
Have fun!
Diffstat (limited to 'slackbook/html/emacs-basic-editing.html')
-rw-r--r-- | slackbook/html/emacs-basic-editing.html | 227 |
1 files changed, 227 insertions, 0 deletions
diff --git a/slackbook/html/emacs-basic-editing.html b/slackbook/html/emacs-basic-editing.html new file mode 100644 index 000000000..fbc5072b4 --- /dev/null +++ b/slackbook/html/emacs-basic-editing.html @@ -0,0 +1,227 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta name="generator" content="HTML Tidy, see www.w3.org" /> +<title>Basic Editing</title> +<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /> +<link rel="HOME" title="Slackware Linux Essentials" href="index.html" /> +<link rel="UP" title="Emacs" href="emacs.html" /> +<link rel="PREVIOUS" title="Modes" href="emacs-modes.html" /> +<link rel="NEXT" title="Saving Files" href="emacs-saving-files.html" /> +<link rel="STYLESHEET" type="text/css" href="docbook.css" /> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +</head> +<body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084" +alink="#0000FF"> +<div class="NAVHEADER"> +<table summary="Header navigation table" width="100%" border="0" cellpadding="0" +cellspacing="0"> +<tr> +<th colspan="3" align="center">Slackware Linux Essentials</th> +</tr> + +<tr> +<td width="10%" align="left" valign="bottom"><a href="emacs-modes.html" +accesskey="P">Prev</a></td> +<td width="80%" align="center" valign="bottom">Chapter 17 Emacs</td> +<td width="10%" align="right" valign="bottom"><a href="emacs-saving-files.html" +accesskey="N">Next</a></td> +</tr> +</table> + +<hr align="LEFT" width="100%" /> +</div> + +<div class="SECT1"> +<h1 class="SECT1"><a id="EMACS-BASIC-EDITING" name="EMACS-BASIC-EDITING">17.4 Basic +Editing</a></h1> + +<p>When you have opened a file, you can of course move around in it with the cursor. The +<b class="KEYCAP">cursor keys</b> and <b class="KEYCAP">PgUp</b>, <b +class="KEYCAP">PgDn</b> do what you'd expect. <b class="KEYCAP">Home</b> and <b +class="KEYCAP">End</b> jump to the beginning and end of the line. (In older versions, +they would actually jump to the beginning and end of the buffer.) However, there are also +<b class="KEYCAP">Control</b> and <b class="KEYCAP">Meta</b> (<b class="KEYCAP">Alt</b>) +key combos that move the cursor around. Because you do not need to move your hands to +another part of the keyboard for these, they are much quicker once you get used to them. +The most important such commands are listed in <a +href="emacs-basic-editing.html#TABLE-EMACS-BASIC-EDITING">Table 17-1</a>.</p> + +<div class="TABLE"><a id="TABLE-EMACS-BASIC-EDITING" +name="TABLE-EMACS-BASIC-EDITING"></a> +<p><b>Table 17-1. Basic Emacs Editing Commands</b></p> + +<table border="0" frame="void" width="100%" class="CALSTABLE"> +<col width="25%" /> +<col width="75%" /> +<thead> +<tr> +<th>Command</th> +<th>Result</th> +</tr> +</thead> + +<tbody> +<tr> +<td><b class="KEYCAP">C</b>-<b class="KEYCAP">b</b> </td> +<td>go one character back</td> +</tr> + +<tr> +<td><b class="KEYCAP">C</b>-<b class="KEYCAP">f</b> </td> +<td>go one character forward</td> +</tr> + +<tr> +<td><b class="KEYCAP">C</b>-<b class="KEYCAP">n</b> </td> +<td>go one line down</td> +</tr> + +<tr> +<td><b class="KEYCAP">C</b>-<b class="KEYCAP">p</b> </td> +<td>go one line up</td> +</tr> + +<tr> +<td><b class="KEYCAP">C</b>-<b class="KEYCAP">a</b> </td> +<td>go to the beginning of the line</td> +</tr> + +<tr> +<td><b class="KEYCAP">C</b>-<b class="KEYCAP">e</b> </td> +<td>go to the end of the line</td> +</tr> + +<tr> +<td><b class="KEYCAP">M</b>-<b class="KEYCAP">b</b> </td> +<td>go one word back</td> +</tr> + +<tr> +<td><b class="KEYCAP">M</b>-<b class="KEYCAP">f</b> </td> +<td>go one word forward</td> +</tr> + +<tr> +<td><b class="KEYCAP">M</b>-<b class="KEYCAP">}</b> </td> +<td>go one paragraph forward</td> +</tr> + +<tr> +<td><b class="KEYCAP">M</b>-<b class="KEYCAP">{</b> </td> +<td>go one paragraph backward</td> +</tr> + +<tr> +<td><b class="KEYCAP">M</b>-<b class="KEYCAP">a</b> </td> +<td>go one sentence backward</td> +</tr> + +<tr> +<td><b class="KEYCAP">M</b>-<b class="KEYCAP">e</b> </td> +<td>go one sentence forward</td> +</tr> + +<tr> +<td><b class="KEYCAP">C</b>-<b class="KEYCAP">d</b> </td> +<td>delete the character under the cursor</td> +</tr> + +<tr> +<td><b class="KEYCAP">M</b>-<b class="KEYCAP">d</b> </td> +<td>delete until the end of the current word</td> +</tr> + +<tr> +<td><b class="KEYCAP">C</b>-<b class="KEYCAP">v</b> </td> +<td>go down one screen (i.e., PgDn)</td> +</tr> + +<tr> +<td><b class="KEYCAP">M</b>-<b class="KEYCAP">v</b> </td> +<td>go up one screen (i.e., PgUp)</td> +</tr> + +<tr> +<td><b class="KEYCAP">M</b>-<b class="KEYCAP"><</b> </td> +<td>go to the beginning of the buffer</td> +</tr> + +<tr> +<td><b class="KEYCAP">M</b>-<b class="KEYCAP">></b> </td> +<td>go to the end of the buffer</td> +</tr> + +<tr> +<td><b class="KEYCAP">C</b>-<b class="KEYCAP">_</b> </td> +<td>undo the last change (can be repeated); note that you actually have to type <b +class="KEYCAP">Shift</b>+<b class="KEYCAP">Control</b>+<b class="KEYCAP">hyphen</b> for +this.</td> +</tr> + +<tr> +<td><b class="KEYCAP">C</b>-<b class="KEYCAP">k</b> </td> +<td>delete to end of line</td> +</tr> + +<tr> +<td><b class="KEYCAP">C</b>-<b class="KEYCAP">s</b> </td> +<td>forward search</td> +</tr> + +<tr> +<td><b class="KEYCAP">C</b>-<b class="KEYCAP">r</b> </td> +<td>backward search</td> +</tr> +</tbody> +</table> +</div> + +<p>Note that many <b class="KEYCAP">Meta</b> commands are parallel to the <b +class="KEYCAP">Control</b> commands except that they operate on larger units: while <b +class="KEYCAP">C</b>-<b class="KEYCAP">f</b> goes forward one character, <b +class="KEYCAP">M</b>-<b class="KEYCAP">f</b> goes forward an entire word, etc.</p> + +<p>Also note that <b class="KEYCAP">M</b>-<b class="KEYCAP"><</b> and <b +class="KEYCAP">M</b>-<b class="KEYCAP">></b> require you to type <b +class="KEYCAP">Shift</b>+<b class="KEYCAP">Alt</b>+<b class="KEYCAP">comma</b> and <b +class="KEYCAP">Shift</b>+<b class="KEYCAP">Alt</b>+<b class="KEYCAP">dot</b> +respectively, since <b class="KEYCAP"><</b> and <b class="KEYCAP">></b> are on <b +class="KEYCAP">Shift</b>+<b class="KEYCAP">comma</b> and <b class="KEYCAP">Shift</b>+<b +class="KEYCAP">dot</b>. (Unless of course you have a different keyboard layout from the +standard US layout.)</p> + +<p>Note that <b class="KEYCAP">C</b>-<b class="KEYCAP">k</b> deletes (kills, as it is +commonly called) all the text after the cursor to the end of the line, but doesn't delete +the line itself (i.e., it doesn't delete the final newline). It only deletes the line if +there was no text after the cursor. In other words, in order to delete a complete line, +you have to put the cursor at the beginning of the line, and then hit <b +class="KEYCAP">C</b>-<b class="KEYCAP">k</b> twice: once to delete the text on the line, +once to delete the line itself.</p> +</div> + +<div class="NAVFOOTER"> +<hr align="LEFT" width="100%" /> +<table summary="Footer navigation table" width="100%" border="0" cellpadding="0" +cellspacing="0"> +<tr> +<td width="33%" align="left" valign="top"><a href="emacs-modes.html" +accesskey="P">Prev</a></td> +<td width="34%" align="center" valign="top"><a href="index.html" +accesskey="H">Home</a></td> +<td width="33%" align="right" valign="top"><a href="emacs-saving-files.html" +accesskey="N">Next</a></td> +</tr> + +<tr> +<td width="33%" align="left" valign="top">Modes</td> +<td width="34%" align="center" valign="top"><a href="emacs.html" +accesskey="U">Up</a></td> +<td width="33%" align="right" valign="top">Saving Files</td> +</tr> +</table> +</div> +</body> +</html> + |