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

57 lines
3.5 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.6 Moving commands</TITLE>
</HEAD>
<BODY>
<meta name="description" value="3.12.6 Moving commands">
<meta name="keywords" value="gs">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<BR> <HR><A NAME=tex2html3567 HREF="node144.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3565 HREF="node137.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3559 HREF="node142.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3569 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3570 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3568 HREF="node144.html">3.12.7 Saving files and </A>
<B>Up:</B> <A NAME=tex2html3566 HREF="node137.html">3.12 Using the vi </A>
<B> Previous:</B> <A NAME=tex2html3560 HREF="node142.html">3.12.5 Changing text</A>
<BR> <HR> <P>
<H2><A NAME=SECTION005126000000000000000>3.12.6 Moving commands</A></H2>
<P>
<A NAME=3954>&#160;</A>
You already know how to use the arrow keys to move around the document.
In addition, you can use the <tt>h</tt>, <tt>j</tt>, <tt>k</tt>, and <tt>l</tt>
commands to move the cursor left, down, up, and right, respectively.
This comes in handy when (for some reason) your arrow keys aren't working
correctly.
<P>
The <tt>w</tt> command moves the cursor to the beginning of the next word;
the <tt>b</tt> moves it to the beginning of the previous word.
<P>
The <tt>0</tt> (that's a zero) command moves the cursor to the beginning of
the current line, and the <tt>$</tt> command moves it to the end of the line.
<P>
When editing large files, you'll want to move forwards or backwards through
the file a screenful at a time. Pressing <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img230.gif"> moves the cursor
one screenful forward, and <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img231.gif"> moves it a screenful back.
<P>
In order to move the cursor to the end of the file, type <tt>G</tt>. You can
also move to an arbitrary line; for example, typing the command
<tt>10G</tt> would move the cursor to line 10 in the file. To move to the
beginning of the file, use <tt>1G</tt>.
<P>
You can couple moving commands with other commands, such as deletion.
For example, the command <tt>d$</tt> will delete everything from the
cursor to the end of the line; <tt>dG</tt> will delete everything from the
cursor to the end of the file, and so on.
<P>
<BR> <HR><A NAME=tex2html3567 HREF="node144.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3565 HREF="node137.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3559 HREF="node142.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3569 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3570 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html3568 HREF="node144.html">3.12.7 Saving files and </A>
<B>Up:</B> <A NAME=tex2html3566 HREF="node137.html">3.12 Using the vi </A>
<B> Previous:</B> <A NAME=tex2html3560 HREF="node142.html">3.12.5 Changing text</A>
<BR> <HR> <P>
<BR> <HR>
<P><ADDRESS>
<I>Matt Welsh <BR>
mdw@sunsite.unc.edu</I>
</ADDRESS>
</BODY>