66 lines
4.1 KiB
HTML
66 lines
4.1 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.3 Inserting text</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<meta name="description" value="3.12.3 Inserting text">
|
|
<meta name="keywords" value="gs">
|
|
<meta name="resource-type" value="document">
|
|
<meta name="distribution" value="global">
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html3531 HREF="node141.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3529 HREF="node137.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3523 HREF="node139.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3533 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3534 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html3532 HREF="node141.html">3.12.4 Deleting text</A>
|
|
<B>Up:</B> <A NAME=tex2html3530 HREF="node137.html">3.12 Using the vi </A>
|
|
<B> Previous:</B> <A NAME=tex2html3524 HREF="node139.html">3.12.2 Starting vi</A>
|
|
<BR> <HR> <P>
|
|
<H2><A NAME=SECTION005123000000000000000>3.12.3 Inserting text</A></H2>
|
|
<P>
|
|
<A NAME=3935> </A>
|
|
You are now in command mode; in order to insert text into the file, press
|
|
<IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img206.gif"> (which will place you into insert mode), and begin typing.
|
|
<P><TT> <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img207.gif"> <P></TT>
|
|
<P>
|
|
While inserting text, you may type as many lines as you wish (pressing
|
|
<IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img208.gif"> after each, of course), and you may correct mistakes
|
|
using the backspace key.
|
|
<P>
|
|
To end insert mode, and return to command mode, press <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img209.gif">.
|
|
<P>
|
|
While in command mode, you can use the arrow keys to move around the
|
|
file. Here, because we only have one line of text, trying to use the
|
|
up- or down-arrow keys will probably cause <tt>vi</tt> to beep at you.
|
|
<P>
|
|
There are several ways to insert text, other than using the <tt>i</tt>
|
|
command. For example, the <tt>a</tt> command inserts text beginning
|
|
<em>after</em> the current cursor position, instead of on the current
|
|
cursor position. For example, use the left arrow key to move the cursor
|
|
between the words ``good'' and ``men''.
|
|
<P><TT> <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img210.gif"> <P></TT>
|
|
Press <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img211.gif">, to start insert mode, type ``<tt>wo</tt>'', and then hit
|
|
<IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img212.gif"> to return to command mode.
|
|
<P><TT> <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img213.gif"> <P></TT>
|
|
<P>
|
|
To begin inserting text at the line below the current one, use the <tt>o</tt>
|
|
command. For example, press <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img214.gif"> and type another line or two:
|
|
<P><TT> <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img215.gif"> <P></TT>
|
|
<P>
|
|
Just remember that at any time you're either in command mode (where
|
|
commands such as <tt>i</tt>, <tt>a</tt>, or <tt>o</tt> are valid), or in
|
|
insert mode (where you're inserting text, followed by <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img216.gif"> to
|
|
return to command mode), or last line mode (where you're entering
|
|
extended commands, as discussed below).
|
|
<A NAME=3940> </A>
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html3531 HREF="node141.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3529 HREF="node137.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3523 HREF="node139.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3533 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3534 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html3532 HREF="node141.html">3.12.4 Deleting text</A>
|
|
<B>Up:</B> <A NAME=tex2html3530 HREF="node137.html">3.12 Using the vi </A>
|
|
<B> Previous:</B> <A NAME=tex2html3524 HREF="node139.html">3.12.2 Starting vi</A>
|
|
<BR> <HR> <P>
|
|
<BR> <HR>
|
|
<P><ADDRESS>
|
|
<I>Matt Welsh <BR>
|
|
mdw@sunsite.unc.edu</I>
|
|
</ADDRESS>
|
|
</BODY>
|