Files
oldlinux-files/docs/Install-Guide/install-guide-2.2.2/node145.html
2024-02-19 00:23:35 -05:00

45 lines
2.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
<!Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
<HEAD>
<TITLE>3.12.8 Editing another file</TITLE>
</HEAD>
<BODY>
<meta name="description" value="3.12.8 Editing another file">
<meta name="keywords" value="gs">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<BR> <HR><A NAME=tex2html3591 HREF="node146.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3589 HREF="node137.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3583 HREF="node144.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3593 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3594 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3592 HREF="node146.html">3.12.9 Including other files</A>
<B>Up:</B> <A NAME=tex2html3590 HREF="node137.html">3.12 Using the vi </A>
<B> Previous:</B> <A NAME=tex2html3584 HREF="node144.html">3.12.7 Saving files and </A>
<BR> <HR> <P>
<H2><A NAME=SECTION005128000000000000000>3.12.8 Editing another file</A></H2>
<P>
<A NAME=3960>&#160;</A>
To edit another file, use the <tt>:e</tt> command. For example,
to stop editing <tt>test</tt>, and edit the file <tt>foo</tt> instead, use
the command
<P><TT> <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img234.gif"> <P></TT>
If you use <tt>:e</tt> without saving the file first, you'll get the error
message
<P><TT> <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img235.gif"> <P></TT>
which simply means that <tt>vi</tt> doesn't want to edit another file until
you save the first one. At this point, you can use <tt>:w</tt> to save the
original file, and then use <tt>:e</tt>, or you can use the command
<P><TT> <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img236.gif"> <P></TT>
The ``<tt>!</tt>'' tells <tt>vi</tt> that you really mean it---edit the new file
without saving changes to the first.
<P>
<BR> <HR><A NAME=tex2html3591 HREF="node146.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3589 HREF="node137.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3583 HREF="node144.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3593 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3594 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3592 HREF="node146.html">3.12.9 Including other files</A>
<B>Up:</B> <A NAME=tex2html3590 HREF="node137.html">3.12 Using the vi </A>
<B> Previous:</B> <A NAME=tex2html3584 HREF="node144.html">3.12.7 Saving files and </A>
<BR> <HR> <P>
<BR> <HR>
<P><ADDRESS>
<I>Matt Welsh <BR>
mdw@sunsite.unc.edu</I>
</ADDRESS>
</BODY>