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

61 lines
3.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.1 Concepts</TITLE>
</HEAD>
<BODY>
<meta name="description" value="3.12.1 Concepts">
<meta name="keywords" value="gs">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<BR> <HR><A NAME=tex2html3507 HREF="node139.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3505 HREF="node137.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3499 HREF="node137.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3509 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3510 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3508 HREF="node139.html">3.12.2 Starting vi</A>
<B>Up:</B> <A NAME=tex2html3506 HREF="node137.html">3.12 Using the vi </A>
<B> Previous:</B> <A NAME=tex2html3500 HREF="node137.html">3.12 Using the vi </A>
<BR> <HR> <P>
<H2><A NAME=SECTION005121000000000000000>3.12.1 Concepts</A></H2>
<P>
While using <tt>vi</tt>, at any one time you are in one of three modes of
operation. These modes are known as <em>command mode</em>, <em>insert mode</em>,
and <em>last line mode</em>.
<P>
<A NAME=3928>&#160;</A>
When you start up <tt>vi</tt>, you are in <em>command mode</em>. This mode
allows you to use certain commands to edit files or to
change to other modes. For example, typing ``<tt>x</tt>'' while in command mode
deletes the character underneath the cursor. The arrow keys move
the cursor around the file which you're editing. Generally, the commands
used in command mode are one or two characters long.
<P>
<A NAME=3929>&#160;</A>
You actually insert or edit text within <em>insert mode</em>. When using
<tt>vi</tt>, you'll probably spend most of your time within this mode.
You start insert mode by using a command such as ``<tt>i</tt>'' (for ``insert'')
from command mode. While in insert mode, you are inserting text into the
document from your current cursor location. To end insert mode and return
to command mode, press <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img201.gif">.
<P>
<A NAME=3930>&#160;</A>
<em>Last line mode</em> is a special mode used to give certain extended
commands to <tt>vi</tt>. While typing these commands, they appear on the
last line of the screen (hence the name). For example, when you type
``<tt>:</tt>'' from command mode, you jump into last line mode, and can
use commands such as ``<tt>wq</tt>'' (to write the file and quit <tt>vi</tt>), or
``<tt>q!</tt>'' (to quit <tt>vi</tt> without saving changes). Last line mode
is generally used for <tt>vi</tt> commands which are longer than one character.
In last line mode, you enter a single-line command and press
<IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img202.gif"> to execute it.
<P>
<BR> <HR><A NAME=tex2html3507 HREF="node139.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3505 HREF="node137.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3499 HREF="node137.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3509 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3510 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3508 HREF="node139.html">3.12.2 Starting vi</A>
<B>Up:</B> <A NAME=tex2html3506 HREF="node137.html">3.12 Using the vi </A>
<B> Previous:</B> <A NAME=tex2html3500 HREF="node137.html">3.12 Using the vi </A>
<BR> <HR> <P>
<BR> <HR>
<P><ADDRESS>
<I>Matt Welsh <BR>
mdw@sunsite.unc.edu</I>
</ADDRESS>
</BODY>