<?xml version="1.0" encoding="ISO-8859-1"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:axle="http://www.cs.odu.edu/~zeil/axle" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ns0="http://www.cs.odu.edu/~zeil/axle" mode="ignore" id="emacs" ns0:xlinkuri="open/emacs.dbk" ns0:xpath="//*[@id='emacs']" ns0:page="emacs" foo="0 " ns0:last="/cocoon/~cs252/open/emacs/section-6.html"><head><title>Editing Text Files</title><link type="text/css" href="_axle/docbookstyle.css" rel="stylesheet"/><link type="text/css" href="_axle/cppformat.css" rel="stylesheet"/><link type="text/css" href="_axle/overrides.css" rel="stylesheet"/><script src="_axle/docbook.js"/><link href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/emacs/section-1.html" title="Next" rel="next"/><link href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/emacs/section-6.html" title="Last" rel="last"/><script>function gotoNext() {top.location.href="/cocoon/~cs252/open/emacs/section-1.html";}
function gotoPrev() {}
function gotoUp() {}
</script><xhtml:link xmlns:xhtml="http://www.w3.org/1999/xhtml" rel="stylesheet" href="_axle/navigation.css" type="text/css"/><xhtml:script xmlns:xhtml="http://www.w3.org/1999/xhtml" src="_axle/navigation.js"/></head><body><table width="100%" class="navigationBar"><tr class="navigationBar"><td width="5%" class="navigationBar"><a class="navigationBarArrow" title="Next" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/emacs/section-1.html"><img class="navigationBar" src="_axle/next.gif" alt="Next"/></a></td><td width="5%" class="navigationBar"><a class="navigationBarArrow" title="Last" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/emacs/section-6.html"><img class="navigationBar" src="_axle/last.gif" alt="Last"/></a></td><td class="navigationBar"/><td width="5%" class="navigationBar"><a class="navigationBar" title="CS252 Home" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/directory/announcements.html"><img class="navigationBar" src="_axle/home.gif" alt="CS252 Home"/></a></td><td width="5%" class="navigationBar"><a class="navigationBar" title="discuss this page" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/forum/getXPath/open/emacs/emacs.html"><img class="navigationBar" src="_axle/forum.gif" alt="discuss this page"/></a></td></tr></table><br/><div class="info_article"><div class="title_article">Editing Text Files</div><div class="author_article"><span class="firstname">Steven</span> <span class="othername" role="mi">J</span> <span class="surname">Zeil</span></div><div class="affiliation">
        <span class="orgname">Old Dominion University</span>
        <span class="orgdiv">Dept. of Computer Science</span>
      </div><table width="100%"><tr><td align="left"><span class="copyright">©<span class="year">2000-2006</span> <span class="holder">Steven J. Zeil, Old Dominion University</span></span></td><td/><td align="right"><span class="date">May. 26, 2006</span></td></tr></table></div><div class="TOC">Contents:<div class="TOC-section0"><a href="section-1.html#section-1">1 In Search of Meta</a></div><div class="TOC-section0"><a href="section-2.html#section-2">2 The .emacs Startup File</a></div><div class="TOC-section0"><a href="section-3.html#section-3">3 Emacs Modes</a></div><div class="TOC-section0"><a href="markregion.html#markregion">4 The Mark and the Region</a></div><div class="TOC-section0"><a href="section-5.html#section-5">5 Where's the Documentation?</a></div><div class="TOC-section0"><a href="section-6.html#section-6">6 For the emacs-phobes</a></div></div>
  
  <div class="epigraph">
    <p class="para" align="center">
              (A printable version of this document is available 
              <a url="allPages.html" href="allPages.html">here</a>.)
            </p>
  </div>
  <p class="para">
    <span class="anchor" id="vim"/>
  </p>
  <p class="para">An <span class="firstterm">editor</span> is a program that allows you to easily create and
alter text files. There are a variety of editors on the system, of
which the most popular are <span class="code">vi</span> and <span class="code">emacs</span>.  Neither is
exactly the easiest thing in the world to learn to use. I suggest
learning <span class="code">emacs</span>, because
<div class="itemizedlist"><ul><li>As you gain more facility with <span class="code">emacs</span> and with Unix in
      general, you will find that <span class="code">emacs</span> offers many advanced
      facilities for doing specific tasks.</li><li>In particular, <span class="code">emacs</span> offers a number of aids for
      programmers, including syntax-based highlighting of different
      programming languages (using different colors/fonts for reserved
      words, comments, strings, etc.), commands for checking matching
      {}, for compiling programs and collecting the error messages,
      and for stepping through those error messages, and for debugging
      the compiled code.</li><li><span class="code">emacs</span> is widely available (for free) for all Unix systems
      and also for MS Windows.</li></ul></div></p>
  <p class="para">To run <span class="code">emacs</span>, make sure that you have correctly identified your
<a href="../loggingin/#termtypes">terminal kind</a>. Then give the command<a onmouseover="DBshowBriefly('fn_fref1_live')" name="fn_fref1" id="fn_fref1" class="footnotemark" href="section-6.html#fn_fnote1">1</a><div class="footnote_live" id="fn_fref1_live">If you are using PuTTY as your telnet/ssh client and you are not running an <a url="../xwinlaunch/" href="../xwinlaunch/">X server</a>, then you should invoke emacs like this:
<div class="screen"><span class="userinput">
   emacs -nw
</span></div>
</div>
<div class="screen"><span class="userinput">
   emacs
</span></div>
Then follow the directions given to bring up the tutorial (i.e., type ^h followed by <span class="quote">
      &#8220;t&#8221;
    </span>.).</p>
  <p class="para">When you are done with the tutorial, here are few extra things you
should know about <span class="code">emacs</span>:</p>
  <script type="text/javascript">
checkForAnchorOnOtherPage('section-1','section-1');
</script>
  <script type="text/javascript">
checkForAnchorOnOtherPage('section-2','section-2');
</script>
  <script type="text/javascript">
checkForAnchorOnOtherPage('section-3','section-3');
</script>
  <script type="text/javascript">
checkForAnchorOnOtherPage('markregion','markregion');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref2','markregion');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fref2_live','markregion');
</script><script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote2','markregion');
</script>
  <script type="text/javascript">
checkForAnchorOnOtherPage('section-5','section-5');
</script>
  <script type="text/javascript">
checkForAnchorOnOtherPage('section-6','section-6');
</script>
<script type="text/javascript">
checkForAnchorOnOtherPage('fn_fnote1','section-6');
</script><br/><table width="100%" class="navigationBar"><tr class="navigationBar"><td width="5%" class="navigationBar"><a class="navigationBarArrow" title="Next" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/emacs/section-1.html"><img class="navigationBar" src="_axle/next.gif" alt="Next"/></a></td><td width="5%" class="navigationBar"><a class="navigationBarArrow" title="Last" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/open/emacs/section-6.html"><img class="navigationBar" src="_axle/last.gif" alt="Last"/></a></td><td class="navigationBar"/><td width="5%" class="navigationBar"><a class="navigationBar" title="CS252 Home" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/directory/announcements.html"><img class="navigationBar" src="_axle/home.gif" alt="CS252 Home"/></a></td><td width="5%" class="navigationBar"><a class="navigationBar" title="discuss this page" href="http://cocoon.cs.odu.edu:80/cocoon/~cs252/forum/getXPath/open/emacs/emacs.html"><img class="navigationBar" src="_axle/forum.gif" alt="discuss this page"/></a></td></tr></table></body></html>