⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 557-558.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 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=557-558//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="555-557.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="../ch29/559-563.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H3><A NAME="Heading17"></A><FONT COLOR="#000077">Customizing <I>emacs</I>

</FONT></H3>

<P>You can customize your version of <TT>emacs</TT> by placing custom functions within a file called .emacs. This file must reside in your home directory. This file contains functions written in <TT>emacs</TT> LISP, with which you can personalize <TT>emacs</TT> to your liking. An example LISP function follows:</P>

<!-- CODE SNIP //-->

<PRE>

(keyboard-translate ?\C-h ?\C-?)

</PRE>

<!-- END CODE SNIP //-->

<P>This function is helpful if your terminal translates the &lt;Backspace&gt; key into the &lt;Ctrl-h&gt; characters. These characters are, by default, the sequence used to summon help from within <TT>emacs</TT>. By specifying a new function and binding this function to a key, you can customize how <TT>emacs</TT> responds to these key sequences.</P>

<P>In the preceding example, <TT>?\C-h</TT> represents the &lt;Ctrl-h&gt; keypress. <TT>?\C-?</TT> represents the &lt;Delete&gt; key. On nearly all ASCII keyboards, both keys represent the same ASCII value, namely 8. After you enter this function line into your .emacs file and save it, the next time you invoke <TT>emacs</TT>, you&#146;ll be able to delete characters by using the &lt;Backspace&gt; key.</P>

<P>Of course, this also means you&#146;ll no longer have access to help from the keyboard. To alleviate this problem, you can bind the help function to a new key sequence, just as you did with the delete function. Simply place the following line into your .emacs file, specifying your chosen key for <I>key</I>:</P>

<!-- CODE SNIP //-->

<PRE>

(keyboard-translate ?\C-<I>key</I> ?\C-h)

</PRE>

<!-- END CODE SNIP //-->

<H3><A NAME="Heading18"></A><FONT COLOR="#000077">From Here&#133;</FONT></H3>

<P>You can find more information on another editor and about Linux&#146;s files system in the following chapters:

</P>

<DL>

<DD><B>&#149;</B>&nbsp;&nbsp;Chapter 8, &#147;Using the <TT>vi</TT> Editor,&#148; discusses the basics of using this popular editor. <TT>vi</TT> is important because it&#146;s found on all Linux/UNIX systems. If you know how to use <TT>vi</TT>, you should be able to edit a file on any system. Systems administrators also use <TT>vi</TT> for many systems admin tasks.

<DD><B>&#149;</B>&nbsp;&nbsp;Chapter 11, &#147;Backing Up Data,&#148; shows you how to properly back up your text files from accidental erasure.

<DD><B>&#149;</B>&nbsp;&nbsp;Chapter 16, &#147;Understanding the File and Directory System,&#148; discusses the basics of files and directories. You should have a basic understanding of the file system when using <TT>emacs</TT> or any other editor. Whereas the editor creates and modifies files, it&#146;s up to you to name them and place them in the appropriate directories.

<DD><B>&#149;</B>&nbsp;&nbsp;Chapter 20, &#147;Printing,&#148; provides information on printing your text files under Linux. Printing files under Linux can be tricky; this chapter helps you prepare your system for printing.

</DL>

<P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="555-557.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="../ch29/559-563.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 + -