📄 555-557.html
字号:
<HTML>
<HEAD>
<TITLE>Special Edition Using Linux, Fourth Edition:Using the emacs Editor</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!--ISBN=0789717468//-->
<!--TITLE=Special Edition Using Linux, Fourth Edition//-->
<!--AUTHOR=Jack Tackett//-->
<!--AUTHOR=Jr.//-->
<!--AUTHOR=Steve Burnett//-->
<!--PUBLISHER=Macmillan Computer Publishing//-->
<!--IMPRINT=Que//-->
<!--CHAPTER=28//-->
<!--PAGES=555-557//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="553-554.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="557-558.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H3><A NAME="Heading16"></A><FONT COLOR="#000077">Basic Command Summary</FONT></H3>
<P>Table 28.4 gives a brief listing of the major commands provided by <TT>emacs</TT>. <Esc><c> means to press and release the <I>meta key</I>—usually the <Esc> key on a PC keyboard, although on some keyboards you can use the <Alt> key and then press the following <c> key. <Ctrl-c> means to press the <Ctrl> key and the <c> key at the same time. Remember, pressing <Ctrl-g> at any time stops the currently executing command.</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT><B>Table 28.4</B> Basic <TT>emacs</TT> Commands
<TR>
<TH COLSPAN="2"><HR>
<TR>
<TH WIDTH="35%" ALIGN="LEFT">Key Sequence
<TH WIDTH="65%" ALIGN="LEFT">Description
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD><B>Saving to Disk</B>
<TD>
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD><Ctrl-x><Ctrl-s>
<TD>Saves current buffer to disk
<TR>
<TD><Ctrl-x><Ctrl-w>
<TD>Writes current buffer to disk, asking for a new filename
<TR>
<TD><Ctrl-x><n>
<TD>Changes filename of current buffer
<TR>
<TD><Esc><z>
<TD>Writes all changed buffers to disk and exits <TT>emacs</TT>
<TR>
<TD COLSPAN="2">
<TR>
<TD><B>Reading from Disk</B>
<TD>
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD><Ctrl-x><Ctrl-f>
<TD>Finds file, reads into a new buffer created from filename
<TR>
<TD><Ctrl-x><Ctrl-r>
<TD>Reads file into current buffer, erasing previous contents
<TR>
<TD><Ctrl-x><Ctrl-i>
<TD>Inserts file into the current buffer at the cursor’s location
<TR>
<TD COLSPAN="2">
<TR>
<TD><B>Moving the Cursor</B>
<TD>
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD><Ctrl-f>
<TD>Moves forward one character
<TR>
<TD><Ctrl-b>
<TD>Moves backward one character
<TR>
<TD><Ctrl-a>
<TD>Moves to front of current line
<TR>
<TD><Ctrl-e>
<TD>Moves to end of current line
<TR>
<TD><Ctrl-n>
<TD>Moves to next line
<TR>
<TD><Ctrl-p>
<TD>Moves to previous line
<TR>
<TD><Esc><f>
<TD>Moves forward a word
<TR>
<TD><Esc><b>
<TD>Moves backward a word
<TR>
<TD><Esc><a>
<TD>Goes to a line
<TR>
<TD><Esc><Shift-.>
<TD>Moves to beginning of buffer
<TR>
<TD><Esc><Shift-,>
<TD>Moves to end of buffer
<TR>
<TD COLSPAN="2">
<TR>
<TD><B>Deleting and Inserting</B>
<TD>
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD><Ctrl-d>
<TD>Deletes next character
<TR>
<TD><Ctrl-c>
<TD>Inserts a space
<TR>
<TD><Esc><d>
<TD>Deletes next word
<TR>
<TD><Ctrl-k>
<TD>Deletes to end of current line
<TR>
<TD><Return>
<TD>Inserts a new line
<TR>
<TD><Ctrl-j>
<TD>Inserts a new line and indent
<TR>
<TD><Ctrl-o>
<TD>Opens a new line
<TR>
<TD><Ctrl-w>
<TD>Deletes region between mark and cursor
<TR>
<TD><Esc><w>
<TD>Copies region to kill buffer
<TR>
<TD><Ctrl-x><Ctrl-o>
<TD>Deletes lines around cursor
<TR>
<TD COLSPAN="2">
<TR>
<TD><B>Searching and Replacing</B>
<TD>
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD><Ctrl-s>
<TD>Searches forward from current position
<TR>
<TD><Ctrl-r>
<TD>Reverses search from current position
<TR>
<TD><Ctrl-x><s>
<TD>Repeats search forward
<TR>
<TD><Ctrl-x><r>
<TD>Repeats search in reverse
<TR>
<TD VALIGN="TOP"><Esc><r>
<TD>Replaces all instances of first typed string in mini-buffer with second typed string, ending each string with <Esc>
<TR>
<TD VALIGN="TOP"><Esc><Ctrl-r>
<TD>Queries before performing the replacement.<BR>Answer in the mini-buffer with one of the following:<BR><Ctrl-g>: Cancels operation<BR><!>: Replaces the rest<BR><?>: Gets a list of options<BR><.>: Exits to where command was initiated<BR><y> or Spacebar: Replaces and continues with replace operation<BR><n>: Doesn’t replace but continues with replace operation
<TR>
<TD COLSPAN="2">
<TR>
<TD><B>Marked Text</B>
<TD>
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD><Ctrl><Spacebar>
<TD>Sets mark at current cursor position
<TR>
<TD><Ctrl-x><Ctrl-x>
<TD>Exchanges mark and cursor
<TR>
<TD><Ctrl-w>
<TD>Deletes the marked region
<TR>
<TD><Esc-w>
<TD>Copies marked region to kill buffer
<TR>
<TD><Ctrl-y>
<TD>Inserts the kill buffer at the current cursor position
<TR>
<TD COLSPAN="2">
<TR>
<TD><B>Buffers</B>
<TD>
<TR>
<TD COLSPAN="2"><HR>
<TR>
<TD><Ctrl-x><b>
<TD>Switches to another buffer
<TR>
<TD><Ctrl-x><x>
<TD>Switches to next buffer in buffer list
<TR>
<TD><Esc><Ctrl-n>
<TD>Changes name of current buffer
<TR>
<TD><Ctrl-x><k>
<TD>Deletes a non-displayed buffer
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="553-554.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="557-558.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -