📄 editors.html
字号:
<!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>Text Editors</title><meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /><link rel="HOME" title="FreeBSD Handbook" href="index.html" /><link rel="UP" title="UNIX Basics" href="basics.html" /><link rel="PREVIOUS" title="Shells" href="shells.html" /><link rel="NEXT" title="Devices and Device Nodes" href="basics-devices.html" /><link rel="STYLESHEET" type="text/css" href="docbook.css" /></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">FreeBSD Handbook</th></tr><tr><td width="10%" align="left" valign="bottom"><a href="shells.html"accesskey="P">Prev</a></td><td width="80%" align="center" valign="bottom">Chapter 3 UNIX Basics</td><td width="10%" align="right" valign="bottom"><a href="basics-devices.html"accesskey="N">Next</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="EDITORS" name="EDITORS">3.10 Text Editors</a></h1><p>A lot of configuration in FreeBSD is done by editing text files. Because of this, itwould be a good idea to become familiar with a text editor. FreeBSD comes with a few aspart of the base system, and many more are available in the ports collection.</p><p>The easiest and simplest editor to learn is an editor called <bclass="APPLICATION">ee</b>, which stands for easy editor. To start <bclass="APPLICATION">ee</b>, one would type at the command line <tt class="COMMAND">ee<var class="REPLACEABLE">filename</var></tt> where <varclass="REPLACEABLE">filename</var> is the name of the file to be edited. For example, toedit <tt class="FILENAME">/etc/rc.conf</tt>, type in <tt class="COMMAND">ee/etc/rc.conf</tt>. Once inside of <tt class="COMMAND">ee</tt>, all of the commands formanipulating the editor's functions are listed at the top of the display. The caret <varclass="LITERAL">^</var> character represents the <b class="KEYCAP">Ctrl</b> key on thekeyboard, so <var class="LITERAL">^e</var> expands to the key combination <bclass="KEYCAP">Ctrl</b>+<b class="KEYCAP">e</b>. To leave <b class="APPLICATION">ee</b>,hit the <b class="KEYCAP">Esc</b> key, then choose leave editor. The editor will promptyou to save any changes if the file has been modified.</p><p>FreeBSD also comes with more powerful text editors such as <bclass="APPLICATION">vi</b> as part of the base system, while other editors, like <bclass="APPLICATION">Emacs</b> and <b class="APPLICATION">vim</b>, are part of the FreeBSDPorts Collection (<ahref="http://www.FreeBSD.org/cgi/url.cgi?ports/editors/emacs/pkg-descr"><ttclass="FILENAME">editors/emacs</tt></a> and <ahref="http://www.FreeBSD.org/cgi/url.cgi?ports/editors/vim/pkg-descr"><ttclass="FILENAME">editors/vim</tt></a>). These editors offer much more functionality andpower at the expense of being a little more complicated to learn. However if you plan ondoing a lot of text editing, learning a more powerful editor such as <bclass="APPLICATION">vim</b> or <b class="APPLICATION">Emacs</b> will save you much moretime in the long run.</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="shells.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="basics-devices.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Shells</td><td width="34%" align="center" valign="top"><a href="basics.html"accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Devices and Device Nodes</td></tr></table></div><p align="center"><small>This, and other documents, can be downloaded from <ahref="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/</a>.</small></p><p align="center"><small>For questions about FreeBSD, read the <ahref="http://www.FreeBSD.org/docs.html">documentation</a> before contacting <<ahref="mailto:questions@FreeBSD.org">questions@FreeBSD.org</a>>.<br />For questions about this documentation, e-mail <<ahref="mailto:doc@FreeBSD.org">doc@FreeBSD.org</a>>.</small></p></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -