50 lines
2.8 KiB
HTML
50 lines
2.8 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.2 Starting vi</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<meta name="description" value="3.12.2 Starting vi">
|
|
<meta name="keywords" value="gs">
|
|
<meta name="resource-type" value="document">
|
|
<meta name="distribution" value="global">
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html3519 HREF="node140.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3517 HREF="node137.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3511 HREF="node138.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3521 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3522 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html3520 HREF="node140.html">3.12.3 Inserting text</A>
|
|
<B>Up:</B> <A NAME=tex2html3518 HREF="node137.html">3.12 Using the vi </A>
|
|
<B> Previous:</B> <A NAME=tex2html3512 HREF="node138.html">3.12.1 Concepts</A>
|
|
<BR> <HR> <P>
|
|
<H2><A NAME=SECTION005122000000000000000>3.12.2 Starting vi</A></H2>
|
|
<P>
|
|
<A NAME=3932> </A>
|
|
The best way to understand these concepts is to actually fire up <tt>vi</tt>
|
|
and edit a file. In the example ``screens'' below, we're only going to
|
|
show a few lines of text, as if the screen was only six lines high
|
|
(instead of twenty-four).
|
|
<P>
|
|
The syntax for <tt>vi</tt> is
|
|
<P><TT> vi <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img203.gif"> <P></TT>
|
|
where <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img204.gif"> is the name of the file that you wish to edit.
|
|
<P>
|
|
Start up <tt>vi</tt> by typing
|
|
<P><TT> /home/larry# <em>vi test</em>
|
|
<P></TT>
|
|
which will edit the file <tt>test</tt>.
|
|
You should see something like
|
|
<P><TT> <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img205.gif"> <P></TT>
|
|
<P>
|
|
The column of ``<tt>~</tt>'' characters indicates that you are the end of
|
|
the file.
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html3519 HREF="node140.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3517 HREF="node137.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3511 HREF="node138.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3521 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3522 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html3520 HREF="node140.html">3.12.3 Inserting text</A>
|
|
<B>Up:</B> <A NAME=tex2html3518 HREF="node137.html">3.12 Using the vi </A>
|
|
<B> Previous:</B> <A NAME=tex2html3512 HREF="node138.html">3.12.1 Concepts</A>
|
|
<BR> <HR> <P>
|
|
<BR> <HR>
|
|
<P><ADDRESS>
|
|
<I>Matt Welsh <BR>
|
|
mdw@sunsite.unc.edu</I>
|
|
</ADDRESS>
|
|
</BODY>
|