/[gentoo]/xml/htdocs/doc/en/vi-guide.xml
Gentoo

Diff of /xml/htdocs/doc/en/vi-guide.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.6 Revision 1.15
1<?xml version="1.0"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<?xml-stylesheet href="/xsl/guide.xsl" type="text/xsl"?> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/vi-guide.xml,v 1.15 2008/05/19 19:57:20 swift Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4
3<guide link = "/doc/en/vi-guide.xml"> 5<guide link="/doc/en/vi-guide.xml">
4<title>Learning vi -- the "cheatsheet" technique</title> 6<title>Learning vi -- the "cheatsheet" technique</title>
7<author title="Author">
5<author title="Author"><mail link="drobbins@gentoo.org">Daniel Robbins</mail></author> 8 <mail link="drobbins@gentoo.org">Daniel Robbins</mail>
9</author>
10<author title="Author">
6<author title="Author"><mail link="stocke2@gentoo.org">Eric Stockbridge</mail></author> 11 <mail link="stocke2@gentoo.org">Eric Stockbridge</mail>
7<abstract>This guide will teach you how to use vi, using a cheat sheet method to accelerate the learning process. This will be the first guide for vi, catering to beginners.</abstract> 12</author>
13<author title="Editor">
14 <mail link="bennyc@gentoo.org">Benny Chuang</mail>
15</author>
16
17<abstract>
18This guide will teach you how to use vi, using a cheat sheet method to
19accelerate the learning process. This will be the first guide for vi,
20catering to beginners.
21</abstract>
22
8<version>1.1.1</version> 23<version>1.1.7</version>
9<date>19 May 2003</date> 24<date>2005-07-21</date>
10 25
11<chapter> 26<chapter>
12<title>Getting Started</title> 27<title>Getting Started</title>
13<section> 28<section>
14<title>Introduction</title> 29<title>Introduction</title>
15<body> 30<body>
31
16<p> 32<p>
17This tutorial will show you how to use vi, a powerful visual editor. Using a 33This tutorial will show you how to use vi, a powerful visual editor.
18special accelerated "cheat sheet" method, this tutorial is designed to make you 34Using a special accelerated <e>cheat sheet</e> method, this tutorial is
19a proficient vi user without requiring a huge time commitment. In this vi 35designed to make you a proficient vi user without requiring a huge
20tutorial, you'll learn how to move around, edit text, use insert mode, copy and 36time commitment. In this vi tutorial, you'll learn how to move
37around, edit text, use insert mode, copy and paste text, and use
21paste text, and use important vim extensions like visual mode and multi-window 38important vim extensions like visual mode and multi-window editing.
22editing.
23</p>
24<p> 39</p>
40
41<p>
25If you either don't know or aren't comfortable using vi, then you owe it to yourself 42If you either don't know or aren't comfortable using vi, then you owe
26to take this tutorial and get up to speed with one of the most popular and powerful 43it to yourself to take this tutorial and get up to speed with one of
27Linux/UNIX visual editing programs. 44the most popular and powerful Linux/UNIX visual editing programs.
28</p> 45</p>
29 46
30</body> 47</body>
31</section> 48</section>
32<section> 49<section>
33<title>About the guide</title> 50<title>About the guide</title>
34<title>Learning vi -- accelerated</title>
35<body> 51<body>
36<p> 52
37There's one thing in particular that makes it difficult to learn vi -- vi has lots of commands.
38In order to use vi effectively, you need to memorize quite a few. This can take a long time, and
39one of the goals of this tutorial is not to take up a lot of your time. So, initially, we have
40a challenge -- how exactly do I help you to memorize lots of commands in a short period of time?
41</p> 53<p>
54There's one thing in particular that makes it difficult to learn vi --
55vi has lots of commands. In order to use vi effectively, you need to
56memorize quite a few. This can take a long time, and one of the goals
57of this tutorial is not to take up a lot of your time. So, initially,
58we have a challenge -- how exactly do I help you to memorize lots of
59commands in a short period of time?
42<p> 60</p>
43To tackle this challenge, as we proceed through this tutorial, we're going to gradually put together 61
44a vi "cheat sheet". This sheet will contain all the important vi commands. After you've completed
45this tutorial, you'll be able to refer to this cheat sheet if you forget a particular command.
46Over time, as you memorize commands, you'll gradually become less and less dependent on the cheat sheet.
47By using the cheat-sheet technique, you'll be able to learn how to use vi faster than ever possible
48before!
49</p> 62<p>
63To tackle this challenge, as we proceed through this tutorial, we're
64going to gradually put together a vi cheat sheet. This sheet will
65contain all the important vi commands. After you've completed this
66tutorial, you'll be able to refer to this cheat sheet if you forget a
67particular command. Over time, as you memorize commands, you'll
68gradually become less and less dependent on the cheat sheet. By using
69the cheat-sheet technique, you'll be able to learn how to use vi
70faster than ever possible before!
71</p>
72
50</body> 73</body>
51</section> 74</section>
52<section> 75<section>
53<title>The learning process</title> 76<title>The learning process</title>
54<body> 77<body>
55 78
79<p>
56<p>In this guide, I'm going to use several techniques to help you learn. 80In this guide, I'm going to use several techniques to help you
57First, I'm going to describe how a particular command works, as you'd expect. Then, I'm going 81learn. First, I'm going to describe how a particular command works,
82as you'd expect. Then, I'm going to ask you to try to use the command
58to ask you to try to use the command in vi (for practice), and then I'm going to ask you to transcribe 83in vi (for practice), and then I'm going to ask you to transcribe the
59the command to the cheat sheet (for later reference.) If you want to learn vi quickly, it's important 84command to the cheat sheet (for later reference.) If you want to
60that you perform all these steps. Trying out a command in vi and transcribing 85learn vi quickly, it's important that you perform all these steps.
86Trying out a command in vi and transcribing the command onto your
61the command onto your cheat sheet will help you to memorize the command. 87cheat sheet will help you to memorize the command.
62</p> 88</p>
89
63</body> 90</body>
64</section> 91</section>
65<section> 92<section>
66<title>Introducing vim</title> 93<title>Introducing vim</title>
67<body> 94<body>
68 95
96<p>
69<p>There are many versions of vi, and I'm going to be showing you how to use a 97There are many versions of vi, and I'm going to be showing you how to
70version of vi called "vim". vim is very popular and has a number of extensions 98use a version of vi called <c>vim</c>. vim is very popular and has a
71that make vi a lot nicer (whenever I demonstrate a vim-specific command, I'll 99number of extensions that make vi a lot nicer (whenever I demonstrate
72make a note of it.) If you need to install vim, you can get it from <uri href="http://www.vim.org/">www.vim.org</uri>. 100a vim-specific command, I'll make a note of it.) If you need to
73In addition to an enhanced 101install vim, you can get it from <uri
102link="http://www.vim.org/">www.vim.org</uri>. In addition to an
74command-line vi, vim also comes with gvim, a nice graphical editor which can be 103enhanced command-line vi, vim also comes with <c>gvim</c>, a nice graphical
75configured to use the excellent GTK+ gui library. Here's a gvim screenshot 104editor which can be configured to use the excellent GTK+ gui library.
76from my system:</p> 105Here's a gvim screenshot from my system:
106</p>
77 107
78<figure link="http://www.ibiblio.org/web-gentoo/images/vishot.png" short="screenshot" caption="VIM screenshot"/> 108<figure link="/images/vishot.png" short="screenshot" caption="VIM screenshot"/>
79 109
110<p>
80<p>If you're a vi newbie, try to get gvim running on your system. Using vi 111If you're a vi newbie, try to get gvim running on your system. Using
81from a gui can make things a bit easier for beginners.</p> 112vi from a gui can make things a bit easier for beginners.
113</p>
82 114
83</body> 115</body>
84</section> 116</section>
85</chapter> 117</chapter>
118
86<chapter> 119<chapter>
87<title>First Steps</title> 120<title>First Steps</title>
88<section> 121<section>
89<title>Pick a file</title> 122<title>Pick a file</title>
90<body> 123<body>
124
125<p>
91<p>Before using vi to edit files, you need to know how to use vi to move around in 126Before using vi to edit files, you need to know how to use vi to move
92a file. vi has a lot of movement commands, and we're going to take a look at many 127around in a file. vi has a lot of movement commands, and we're going
93of them. For this part of the tutorial, find an unimportant text file and load it into 128to take a look at many of them. For this part of the tutorial, find
94vi by typing:</p> 129an unimportant text file and load it into vi by typing:
130</p>
131
132<pre caption="Loading a file into vi">
133$ <i>vi myfile.txt</i>
95<pre> 134</pre>
96$ vi myfile.txt 135
97</pre><p>
98If you have vim installed, type "vim myfile.txt". If you'd prefer to use gvim, type
99"gvim myfile.txt". myfile.txt should be the name of a text file on your system.
100</p> 136<p>
101</body> 137If you have vim installed, type <c>vim myfile.txt</c>. If you'd prefer to
102</section> 138use gvim, type <c>gvim myfile.txt</c>. <path>myfile.txt</path> should be the
139name of a text file on your system.
140</p>
103 141
142</body>
143</section>
104<section> 144<section>
105<title>Inside vi</title> 145<title>Inside vi</title>
106<body> 146<body>
107 147
148<p>
108<p>After vi loads, you should see a part of the text file you loaded on your screen. 149After vi loads, you should see a part of the text file you loaded
109Congratulations -- you're in vi! Unlike many editors, when vi starts up, it is in 150on your screen. Congratulations -- you're in vi! Unlike many
110a special mode called "command mode". This means that if you press "l" on the keyboard, 151editors, when vi starts up, it is in a special mode called <e>command
152mode</e>. This means that if you press <c>l</c>on the keyboard, instead of
111instead of inserting an "l" into the file at the current cursor position, the cursor 153inserting an <c>l</c> into the file at the current cursor position, the
112will move one character to the right instead. In command mode, the 154cursor will move one character to the right instead. In command mode,
113characters on your keyboard are used to send commands to vi rather than insert literal 155the characters on your keyboard are used to send commands to vi rather
114characters into the text. One of the most essential types of commands are movement commands; 156than insert literal characters into the text. One of the most
115let's take a look at some.</p> 157essential types of commands are movement commands; let's take a look
158at some.
159</p>
116 160
117</body> 161</body>
118</section> 162</section>
119</chapter> 163</chapter>
164
120<chapter> 165<chapter>
121<title>Moving around</title> 166<title>Moving around</title>
122<section> 167<section>
123<title>Moving in vi, part 1</title> 168<title>Moving in vi, part 1</title>
124<body> 169<body>
125 170
171<p>
126 <p>When in command mode, you can use the <c>h</c>,<c>j</c>,<c>k</c> and <c>l</c> keys to move the cursor left, 172When in command mode, you can use the <c>h</c>,<c>j</c>,<c>k</c> and
173<c>l</c> keys to move the cursor left, down, up and right
127down, up and right respectively. If you're using a modern version of vi, you can also 174respectively. If you're using a modern version of vi, you can also
128use the arrow keys for this purpose. The <c>h</c>,<c>j</c>,<c>k</c> and <c>l</c> keys are handy because once 175use the arrow keys for this purpose. The <c>h</c>,<c>j</c>,<c>k</c>
129you're comfortable with them, you'll be able to move around in the file without moving 176and <c>l</c> keys are handy because once you're comfortable with them,
130your fingers from the home keyboard row. Try using <c>h</c>,<c>j</c>,<c>k</c> and <c>l</c> (and the arrow keys) to move 177you'll be able to move around in the file without moving your fingers
178from the home keyboard row. Try using <c>h</c>,<c>j</c>,<c>k</c> and
179<c>l</c> (and the arrow keys) to move around in the text file. Try
131around in the text file. Try using <c>h</c> until you get to the beginning of a line. Notice that 180using <c>h</c> until you get to the beginning of a line. Notice that
132vi doesn't allow you to "wrap around" to the previous line by hitting <c>h</c> while you're on the first 181vi doesn't allow you to "wrap around" to the previous line by hitting
182<c>h</c> while you're on the first character. Likewise, you can't
133character. Likewise, you can't "wrap around" to the next line by hitting <c>l</c> at the end of a line. 183"wrap around" to the next line by hitting <c>l</c> at the end of a
184line.
134</p> 185</p>
135 186
136</body> 187</body>
137</section> 188</section>
138<section> 189<section>
139<title>Moving in vi, part 2</title> 190<title>Moving in vi, part 2</title>
140<body> 191<body>
141 192
193<p>
142<p>vi offers special shortcuts for jumping to the beginning or end of the current line. You can 194vi offers special shortcuts for jumping to the beginning or end of the
143 press <c>0</c> (zero) to jump to the first character of a line, and <c>$</c> to jump to the last character of the line. 195current line. You can press <c>0</c> (zero) to jump to the first
144Try 'em and see. Since vi has so many handy movement commands, it makes a great "pager" (like the 196character of a line, and <c>$</c> to jump to the last character of the
145more or less commands.) Using vi as a pager will also help you to learn all the movement 197line. Try 'em and see. Since vi has so many handy movement commands,
146commands very quickly.</p> 198it makes a great "pager" (like the more or less commands.) Using vi
199as a pager will also help you to learn all the movement commands very
200quickly.
201</p>
147 202
203<p>
148<p>You can also use <c>&lt;CTR&gt;F</c> and <c>&lt;CTR&gt;B</c> to move forwards and backwards a page at a time. 204You can also use <c>&lt;CTR&gt;F</c> and <c>&lt;CTR&gt;B</c> to move
149Modern versions of vi (like vim) will also allow you to use the PGUP and PGDOWN keys for this purpose. 205forwards and backwards a page at a time. Modern versions of vi (like
206vim) will also allow you to use the <c>PGUP</c> and <c>PGDOWN</c> keys for this
207purpose.
150</p> 208</p>
151 209
152</body> 210</body>
153</section> 211</section>
154<section> 212<section>
155<title>Word moves, part 1</title> 213<title>Word moves, part 1</title>
156<body> 214<body>
157 <p>vi also allows you to move to the left or right by word increments. To move to the <i>first</i> character of the
158 next word, press <c>w</c>. To move to the <i>last</i> character of the next word, press <c>e</c>. To move to the first character
159 of the <i>previous</i> word, press <c>b</c>. Test 'em out.</p>
160</body>
161</section>
162 215
216<p>
217vi also allows you to move to the left or right by word increments.
218To move to the <e>first</e> character of the next word, press
219<c>w</c>. To move to the <e>last</e> character of the next word,
220press <c>e</c>. To move to the first character of the <e>previous</e>
221word, press <c>b</c>. Test 'em out.
222</p>
223
224</body>
225</section>
163<section> 226<section>
164<title>Word moves, part 2</title> 227<title>Word moves, part 2</title>
165<body> 228<body>
229
230<p>
166<p>After playing around with the word movement commands, you may have noticed that vi 231After playing around with the word movement commands, you may have
167considers words like "foo-bar-oni" as five separate words! This is because by default, 232noticed that vi considers words like <c>foo-bar-oni</c> as five separate
168vi delimits words by spaces <i>or</i> punctuation. foo-bar-oni is therefore considered 233words! This is because by default, vi delimits words by spaces
169five words: "foo","-","bar","-" and "oni".</p> 234<e>or</e> punctuation. <c>foo-bar-oni</c> is therefore considered five
235words: <c>foo</c>, <c>-</c>, <c>bar</c>, <c>-</c> and <c>oni</c>.
236</p>
237
238<p>
170<p>Sometimes, this is what you want, and sometimes it isn't. Fortunately, vi also 239Sometimes, this is what you want, and sometimes it isn't.
171 understands the concept of a "bigword". vi delimits bigwords by <i>spaces or newlines only</i>. 240Fortunately, vi also understands the concept of a "bigword". vi
241delimits bigwords by <e>spaces or newlines only</e>. This means that
172This means that while foo-bar-oni is considered five vi words, it's considered only one 242while <c>foo-bar-oni</c> is considered five vi words, it's considered only
173vi bigword.</p> 243one vi bigword.
244</p>
174 245
175</body> 246</body>
176</section> 247</section>
177<section> 248<section>
178<title>Word moves, part 3</title> 249<title>Word moves, part 3</title>
179<body> 250<body>
180<p>To jump around to the next and previous bigword, you can use a <i>capitalized</i> 251
181 word move command. Use <c>W</c> to jump to the first character of the next bigword, <c>E</c> to jump
182 to the last character of the next bigword, and <c>B</c> to jump to the first character
183of the previous bigword. Test 'em out, and compare the matching word and bigword movement
184commands until you understand their differences.
185</p> 252<p>
186 253To jump around to the next and previous bigword, you can use a
254<e>capitalized</e> word move command. Use <c>W</c> to jump to the
255first character of the next bigword, <c>E</c> to jump to the last
256character of the next bigword, and <c>B</c> to jump to the first
257character of the previous bigword. Test 'em out, and compare the
258matching word and bigword movement commands until you understand their
259differences.
260</p>
187 261
188</body> 262</body>
189</section> 263</section>
190<section> 264<section>
191<title>Bigger moves</title> 265<title>Bigger moves</title>
192<body> 266<body>
267
268<p>
193 <p>We just have a few more commands to cover before it's time to start puting together our 269We just have a few more commands to cover before it's time to start
194 cheat sheet. You can use the <c>(</c> and <c>)</c> characters to move to the beginning of the previous and next sentence. 270puting together our cheat sheet. You can use the <c>(</c> and
195 In addition, you can hit <c>{</c> or <c>}</c> to jump to the beginning of the current paragraph, and the beginning of the 271<c>)</c> characters to move to the beginning of the previous and next
196next. Test 'em out.</p> 272sentence. In addition, you can hit <c>{</c> or <c>}</c> to jump to
273the beginning of the current paragraph, and the beginning of the next.
274Test 'em out.
275</p>
197 276
198</body> 277</body>
199</section> 278</section>
200</chapter> 279</chapter>
280
201<chapter> 281<chapter>
202<title>quiting</title>
203<section>
204<title>Quitting</title> 282<title>Quitting</title>
283<section>
205<body> 284<body>
285
286<p>
206<p>We've covered the basic movement commands, but there are another couple of commands that you need 287We've covered the basic movement commands, but there are another
288couple of commands that you need to know. Typing <c>:q</c> will quit
207to know. Typing <c>:q</c> will quit vi. If this doesn't work, then you probably accidentally modified the file 289vi. If this doesn't work, then you probably accidentally modified the
208in some way. To tell vi to quit, throwing away any changes, type <c>:q!</c>. You should now be at the command 290file in some way. To tell vi to quit, throwing away any changes, type
209prompt.</p> 291<c>:q!</c>. You should now be at the command prompt.
292</p>
210 293
211<p>In vi, any command that begins with a ":" is said to be an <i>ex-mode</i> command. This is because vi 294<p>
295In vi, any command that begins with a <c>:</c> is said to be an
296<e>ex-mode</e> command. This is because vi has a built-in non-visual
212 has a built-in non-visual editor called <e>ex</e>. It can be used similarly to sed to perform line-based 297editor called <e>ex</e>. It can be used similarly to sed to perform
213editing operations. In addition, it can also be used to quit, as we've just seen. If you ever hit 298line-based editing operations. In addition, it can also be used to
299quit, as we've just seen. If you ever hit the <c>Q</c> key while in
214the <c>Q</c> key while in command mode, you'll be transported to ex mode. If this ever happens to you , you'll 300command mode, you'll be transported to ex mode. If this ever happens
215be confronted with a : prompt, and hitting enter will scroll the entire screen upwards. To get back 301to you, you'll be confronted with a : prompt, and hitting enter will
216to good 'ol vi mode, simply type vi and hit enter.</p> 302scroll the entire screen upwards. To get back to good 'ol vi mode,
303simply type vi and hit enter.
304</p>
217 305
218</body> 306</body>
219</section> 307</section>
220</chapter> 308</chapter>
309
221<chapter> 310<chapter>
222<title>The Cheat Sheet</title> 311<title>The Cheat Sheet</title>
223<section> 312<section>
224<title>The beginnings of the cheat sheet</title> 313<title>The beginnings of the cheat sheet</title>
225<body> 314<body>
315
316<p>
226<p>We've covered a lot of commands, and it's time to transcribe them to our cheat sheet. For the 317We've covered a lot of commands, and it's time to transcribe them to
227cheat sheet, you'll need a US letter or A4 sized piece of paper (we're going to pack a lot of info 318our cheat sheet. For the cheat sheet, you'll need a US letter or A4
319sized piece of paper (we're going to pack a lot of info onto this
228onto this sheet!) Here's a picture of my cheat sheet after I've transcribed all the commands that 320sheet!) Here's a picture of my cheat sheet after I've transcribed all
229we've covered so far. Try to follow my layout if possible so that we can fit everything on one 321the commands that we've covered so far. Try to follow my layout if
230sheet.</p> 322possible so that we can fit everything on one sheet.
323</p>
231 324
232<figure link="http://www.ibiblio.org/web-gentoo/images/vicheat-first.png" short="First part of the cheat sheet" caption="Cheat Sheet"/> 325<figure link="/images/vicheat-first.png" short="First part of the cheat sheet"
326caption="Cheat Sheet"/>
233 327
234</body> 328</body>
235
236</section> 329</section>
237<section> 330<section>
238<title>Miscellaneous vi</title> 331<title>Miscellaneous vi</title>
239
240<body> 332<body>
241<p>Let's continue our rapid command-covering pace. In command-mode, you can jump to a particularline by typing <c>G</c>. To jump to the first line of a file, type <c>1G</c>. Note that <c>G</c> is capitalized.</p> 333
242<p>If you want to jump to the next occurence of a particular text pattern, type <c>/&lt;regexp&gt;</c> and hit <c>enter</c>. Replace 334<p>
243&lt;regexp&gt; with the regular expression you're looking for. If you don't know how to use regular expressions, don't 335Let's continue our rapid command-covering pace. In command-mode, you
244fret -- typing <c>/foo</c> will move to the next occurence of <i>foo</i>. The only thing you'll need to watch out for is when 336can jump to a particularline by typing <c>G</c>. To jump to the first
245you want to refer to the literal <i>^</i>, <i>.</i>, <i>$</i> or <i>\</i> characters. Prefix these characters with a backslash (<i>\</i>), and you'll 337line of a file, type <c>1G</c>. Note that <c>G</c> is capitalized.
338</p>
339
340<p>
341If you want to jump to the next occurence of a particular text
342pattern, type <c>/&lt;regexp&gt;</c> and hit <c>enter</c>. Replace
343&lt;regexp&gt; with the regular expression you're looking for. If you
344don't know how to use regular expressions, don't fret -- typing
345<c>/foo</c> will move to the next occurence of <e>foo</e>. The only
346thing you'll need to watch out for is when you want to refer to the
347literal <c>^</c>, <c>.</c>, <c>$</c> or <c>\</c> characters. Prefix
348these characters with a backslash (<c>\</c>), and you'll be set. For
246be set. For example, <c>/foo\.gif</c> will search for the next occurence of "<i>foo.gif</i>".</p> 349example, <c>/foo\.gif</c> will search for the next occurence of
247<p>To repeat the search forwards, hit <c>n</c>. To repeat the search backwards, type <c>N</c>. As always, test these 350"foo.gif".
351</p>
352
353<p>
354To repeat the search forwards, hit <c>n</c>. To repeat the search
355backwards, type <c>N</c>. As always, test these commands out in your
248commands out in your very own vi editor. You can also type <c>//</c> to repeat the last search.</p> 356very own vi editor. You can also type <c>//</c> to repeat the last
357search.
358</p>
249 359
250</body> 360</body>
251</section> 361</section>
252</chapter> 362</chapter>
363
253<chapter> 364<chapter>
254<title>Saving and Editing</title> 365<title>Saving and Editing</title>
255<section> 366<section>
256<title>Save and save as...</title> 367<title>Save and save as...</title>
257<body> 368<body>
369
370<p>
258<p>We've covered how you can use the <i>ex</i> command <c>:q</c> to quit from vi. If you want to save your 371We've covered how you can use the <e>ex</e> command <c>:q</c> to quit
259changes, type <c>:w</c>. If you want to save your changes to another file, type <c>:w filename.txt</c> to 372from vi. If you want to save your changes, type <c>:w</c>. If you
373want to save your changes to another file, type <c>:w filename.txt</c>
260save as <e>filename.txt</e>. If you want to save and quit, type <c>:x</c> or <c>:wq</c>.</p> 374to save as <e>filename.txt</e>. If you want to save and quit, type
261<p>In vim (and other advanced vi editors, like elvis)<c>:w</c>, you can have multiple buffers open at once. To open a file into a new window, type <c>:sp filename.txt</c>. <e>filename.txt</e> will appear open for editing in a new split window. To switch between windows, type <c>&lt;CTR&gt;w&lt;CTR&gt;w</c> (control-w twice). Any <c>:q</c>, <c>:q!</c>, <c>:w</c> and <c>:x</c> commands that you enter will only be applied to the currently-active window.</p> 375<c>:x</c> or <c>:wq</c>.
262</body> 376</p>
263</section>
264 377
378<p>
379In vim (and other advanced vi editors, like elvis)<c>:w</c>, you can
380have multiple buffers open at once. To open a file into a new window,
381type <c>:sp filename.txt</c>. <path>filename.txt</path> will appear open
382for editing in a new split window. To switch between windows, type
383<c>&lt;CTR&gt;w&lt;CTR&gt;w</c> (control-w twice). Any <c>:q</c>,
384<c>:q!</c>, <c>:w</c> and <c>:x</c> commands that you enter will only
385be applied to the currently-active window.
386</p>
387
388</body>
389</section>
265<section> 390<section>
266<title>Simple edits</title> 391<title>Simple edits</title>
267<body> 392<body>
393
394<p>
268<p>Now, it's time to start learning some of the simple editing commands. The commands that 395Now, it's time to start learning some of the simple editing commands.
269we'll cover here are considered "simple" because the commands keep you in command mode. The 396The commands that we'll cover here are considered <e>simple</e> because the
397commands keep you in command mode. The more complex editing commands
270more complex editing commands automatically put you into insert mode -- a mode that allows 398automatically put you into insert mode -- a mode that allows you to
271you to enter literal data from the keyboard. We'll cover those in a bit.</p> 399enter literal data from the keyboard. We'll cover those in a bit.
272<p>For now, try moving over some characters and hitting <c>x</c> repeatedly. You'll see that <c>x</c> 400</p>
401
402<p>
403For now, try moving over some characters and hitting <c>x</c>
404repeatedly. You'll see that <c>x</c> will delete the current
273will delete the current character under the cursor. Now, move to the middle of the paragraph 405character under the cursor. Now, move to the middle of the paragraph
274somewhere in your text file, and hit <c>J</c> (capitalized). You'll see that the <c>J</c> command tells 406somewhere in your text file, and hit <c>J</c> (capitalized). You'll
275vi to join the next line to the end of the current line. Now, move over a character and hit 407see that the <c>J</c> command tells vi to join the next line to the
408end of the current line. Now, move over a character and hit
276<c>r</c>, and then type in a new character; you'll see that the original character has been replaced. 409<c>r</c>, and then type in a new character; you'll see that the
277Finally, move to any line in the file and 410original character has been replaced. Finally, move to any line in
278type <c>dd</c>. You'll see that <c>dd</c> deletes the current line of text.</p> 411the file and type <c>dd</c>. You'll see that <c>dd</c> deletes the
412current line of text.
413</p>
279 414
280</body> 415</body>
281</section> 416</section>
282<section> 417<section>
283<title>Repeating and deleting</title> 418<title>Repeating and deleting</title>
284<body> 419<body>
420
421<p>
285 <p>You can repeat any editing command by hitting the <c>.</c> key. If you experiment, you'll see that 422You can repeat any editing command by hitting the <c>.</c> key. If
423you experiment, you'll see that typing <c>dd...</c> will delete 4
286 typing <c>dd...</c> will delete 4 lines, and <c>J......</c> will join four lines. As usual, vi provides with 424lines, and <c>J......</c> will join four lines. As usual, vi provides
287another handy shortcut. 425with another handy shortcut.
426</p>
427
288</p> 428<p>
289<p>To delete text, you can also use the <c>d</c> command combined with any movement command. For example, 429To delete text, you can also use the <c>d</c> command combined with
290 <c>dw</c> will delete from the current position to the beginning of the next word; <c>d)</c> will delete up until the 430any movement command. For example, <c>dw</c> will delete from the
291 end of the next sentence, and <c>d}</c> will delete the remainder of the paragraph. Experiment with the 431current position to the beginning of the next word; <c>d)</c> will
432delete up until the end of the next sentence, and <c>d}</c> will
433delete the remainder of the paragraph. Experiment with the
292 <c>d</c> command and the other editing commands until you're comfortable with them.</p> 434<c>d</c> command and the other editing commands until you're
435comfortable with them.
436</p>
437
293</body> 438</body>
294</section> 439</section>
295<section> 440<section>
296<title>Undo!</title> 441<title>Undo!</title>
297<body> 442<body>
298<p>Now that we're experimenting with deletion, it would be a good time to learn how to undo any changes. 443
299 By pressing <c>u</c>, the original version of vi allowed you to undo the last edit only. However, modern versions
300 of vi like vim will allow you to repeatedly press <c>u</c> to continue to undo changes to your file. Try combining
301 some <c>d</c> and <c>u</c> commands together.
302</p> 444<p>
303</body> 445Now that we're experimenting with deletion, it would be a good time to
304</section> 446learn how to undo any changes. By pressing <c>u</c>, the original
447version of vi allowed you to undo the last edit only. However, modern
448versions of vi like vim will allow you to repeatedly press <c>u</c> to
449continue to undo changes to your file. Try combining some <c>d</c>
450and <c>u</c> commands together.
451</p>
305 452
453</body>
454</section>
306<section> 455<section>
307<title>Updating the cheat sheet</title> 456<title>Updating the cheat sheet</title>
308<body> 457<body>
458
459<p>
309<p>Time to update the cheat sheet! After adding all the commands we've covered so far, your 460Time to update the cheat sheet! After adding all the commands we've
310cheat sheet should look like this:</p> 461covered so far, your cheat sheet should look like this:
462</p>
311 463
312 <figure link="http://www.ibiblio.org/web-gentoo/images/vicheat-edit.png" short="Cheat sheet" caption="Cheat sheet with editing commands"/> 464<figure link="/images/vicheat-edit.png" short="Cheat sheet" caption="Cheat
465sheet with editing commands"/>
313 466
314</body> 467</body>
315</section> 468</section>
316</chapter> 469</chapter>
470
317<chapter> 471<chapter>
318<title>Insert mode</title> 472<title>Insert mode</title>
319<section> 473<section>
320<title>Insert mode</title>
321
322<body> 474<body>
475
476<p>
323<p>So far, we've covered how to move around in vi, perform file i/o, and perform basic editing 477So far, we've covered how to move around in vi, perform file i/o, and
324operations. However, I still haven't shown you how to actually type in free-form text! This 478perform basic editing operations. However, I still haven't shown you
479how to actually type in free-form text! This was intentional, because
325was intentional, because vi's insert mode is a bit complicated at first. However, after you 480vi's insert mode is a bit complicated at first. However, after you
326become comfortable with insert mode, its complexity (and flexibility) will become an asset. 481become comfortable with insert mode, its complexity (and flexibility)
482will become an asset.
483</p>
484
327</p> 485<p>
328<p>In vi insert mode, you'll be able to enter text directly to the screen just like you can in many 486In vi <e>insert mode</e>, you'll be able to enter text directly to the screen
329other visual editors. Once you've entered your modifications, you can hit escape to return to 487just like you can in many other visual editors. Once you've entered
330command mode. You can enter insert mode by pressing <c>i</c> or <c>a</c>. If you press <c>i</c>, your text will be <e>inserted</e> 488your modifications, you can hit escape to return to <e>command mode</e>. You
331before the current character, and if you hit <c>a</c>, your text will be <e>appended</e> after the current character. 489can enter insert mode by pressing <c>i</c> or <c>a</c>. If you press
332Remember, after you enter your text, hit <c>&lt;ESC&gt;</c> to return to command mode.</p> 490<c>i</c>, your text will be <e>inserted</e> before the current
491character, and if you hit <c>a</c>, your text will be <e>appended</e>
492after the current character. Remember, after you enter your text, hit
493<c>&lt;ESC&gt;</c> to return to command mode.
494</p>
495
333</body> 496</body>
334</section> 497</section>
335<section> 498<section>
336<title>Benefits of insert mode</title> 499<title>Benefits of insert mode</title>
337<body> 500<body>
338 <p>Go ahead and try using the <c>a</c> and <c>i</c> commands. Hit either <c>a</c> or <c>i</c>, type some text, and then hit 501
339 escape to get back to command mode. After hitting <c>a</c> or <c>i</c>, try hitting <c>&lt;ENTER&gt;</c>, and see what happens. 502<p>
340 Try using the arrow keys and the <c>&lt;DEL&gt;</c> key to get a feel for how insert mode works. By using 503Go ahead and try using the <c>a</c> and <c>i</c> commands. Hit either
341the arrow keys and <c>&lt;DEL&gt;</c> key, you can perform significant editing steps without repeatedly entering 504<c>a</c> or <c>i</c>, type some text, and then hit escape to get back
505to command mode. After hitting <c>a</c> or <c>i</c>, try hitting
506<c>&lt;ENTER&gt;</c>, and see what happens. Try using the arrow keys
507and the <c>&lt;DEL&gt;</c> key to get a feel for how insert mode
508works. By using the arrow keys and <c>&lt;DEL&gt;</c> key, you can
509perform significant editing steps without repeatedly entering and
342and leaving insert mode</p> 510leaving insert mode.
511</p>
512
343</body> 513</body>
344</section> 514</section>
345<section> 515<section>
346<title>Insert options</title> 516<title>Insert options</title>
347<body> 517<body>
518
519<p>
348 <p>Here are some other handy ways to enter insert mode. Press <c>A</c> (captial) to begin appending 520Here are some other handy ways to enter insert mode. Press <c>A</c>
521(captial) to begin appending to the <e>end</e> of the current line,
349 to the <e>end</e> of the current line, regardless of your current position on the line. Likewise, press 522regardless of your current position on the line. Likewise, press
350 <c>I</c> (capital) to begin inserting text at the <e>beginning</e> of the current line. Press <c>o</c> to create 523<c>I</c> (capital) to begin inserting text at the <e>beginning</e> of
351 a new blank line below the current line into which you can insert text, and press <c>O</c> (capital) to 524the current line. Press <c>o</c> to create a new blank line below the
352create a new line above the current line. To replace the entire current line with a new line, 525current line into which you can insert text, and press <c>O</c>
353press <c>cc</c>. To replace everything from the current position to the end of the line, type <c>c$</c>. To replace 526(capital) to create a new line above the current line. To replace the
527entire current line with a new line, press <c>cc</c>. To replace
354everything from the current position to the beginning of the line, type <c>c0</c>.</p> 528everything from the current position to the end of the line, type
529<c>c$</c>. To replace everything from the current position to the
530beginning of the line, type <c>c0</c>.
531</p>
532
533<p>
355<p>In addition to performing a special operation, every one of these commands will put you 534In addition to performing a special operation, every one of these
356 into insert mode. After typing in your text, hit <c>&lt;ESC&gt;</c> to return to command mode. 535commands will put you into insert mode. After typing in your text,
536hit <c>&lt;ESC&gt;</c> to return to command mode.
357</p> 537</p>
358 538
359</body> 539</body>
360</section> 540</section>
361<section> 541<section>
362<title>Changing text</title> 542<title>Changing text</title>
363<body> 543<body>
364 <p>We've used the <c>c</c> (change) command a little bit so far when we typed <c>cc</c>, <c>c0</c> and <c>c$</c>. <c>cc</c> is a special 544
365 form of the change command, similar to <c>dd</c>. the <c>c0</c> and <c>c$</c> commands are examples of using the change 545<p>
366 command in combination with a movement command. In this form, <c>c</c> works similarly to <c>d</c>, except that it 546We've used the <c>c</c> (change) command a little bit so far when we
367leaves you in insert mode so that you can enter replacement text for the deleted region. Try combining some 547typed <c>cc</c>, <c>c0</c> and <c>c$</c>. <c>cc</c> is a special form
368movement commands with <c>c</c> and test them out on your file (hint: <c>cW</c>, <c>ce</c>, <c>c(</c> .) 548of the change command, similar to <c>dd</c>. the <c>c0</c> and
549<c>c$</c> commands are examples of using the change command in
550combination with a movement command. In this form, <c>c</c> works
551similarly to <c>d</c>, except that it leaves you in insert mode so
552that you can enter replacement text for the deleted region. Try
553combining some movement commands with <c>c</c> and test them out on
554your file (hint: <c>cW</c>, <c>ce</c>, <c>c(</c> .)
369</p> 555</p>
370 556
371</body> 557</body>
372</section> 558</section>
373</chapter> 559</chapter>
560
374<chapter> 561<chapter>
375<title>Compound Commands</title> 562<title>Compound Commands</title>
376<section> 563<section>
377<title>Compound commands</title>
378<body> 564<body>
379 <p>vi <e>really</e> becomes powerful when you start using compound ("combo") commands, like <c>d{</c> and <c>cw</c>. 565
566<p>
567vi <e>really</e> becomes powerful when you start using compound
568("combo") commands, like <c>d{</c> and <c>cw</c>. In addition to
380In addition to these commands, you can also combine a number with any movement command, such as 569these commands, you can also combine a number with any movement
381<c>3w</c>, which will tell vi to jump three words to the right. Here are some more movement "combo" command 570command, such as <c>3w</c>, which will tell vi to jump three words to
571the right. Here are some more movement "combo" command examples:
382examples: <c>12b</c>, <c>4j</c>.</p> 572<c>12b</c>, <c>4j</c>.
573</p>
574
575<p>
383<p>vi, in addition to allowing (number)(movement command) combinations, also allows <c>d</c> or <c>c</c> 576vi, in addition to allowing (number)(movement command) combinations,
384 to be combined with a number or movement command. So, <c>d3w</c> will delete the next three words, <c>d2j</c> will 577also allows <c>d</c> or <c>c</c> to be combined with a number or
385 delete the current and next two lines, etc. Test out some <c>c</c> and <c>d</c> combo moves to get a feel for 578movement command. So, <c>d3w</c> will delete the next three words,
579<c>d2j</c> will delete the current and next two lines, etc. Test out
580some <c>c</c> and <c>d</c> combo moves to get a feel for how powerful
386how powerful and concise vi editing can be. Once these commands are second-nature, you'll be able 581and concise vi editing can be. Once these commands are second-nature,
387to edit files at blazing speed.</p> 582you'll be able to edit files at blazing speed.
583</p>
388 584
389</body> 585</body>
390</section> 586</section>
391<section> 587<section>
392<title>Updating the cheat sheet</title> 588<title>Updating the cheat sheet</title>
393<body> 589<body>
590
591<p>
394<p>Time to update the cheat sheet again. Here's what it looks like so far:</p> 592Time to update the cheat sheet again. Here's what it looks like so
593far:
395<p> 594</p>
396 <figure link="http://www.ibiblio.org/web-gentoo/images/vicheat-compound.png" short="Cheat Sheet" caption="Cheat sheet with compound commands"/>
397 595
398</p> 596<figure link="/images/vicheat-compound.png" short="Cheat Sheet" caption="Cheat
597sheet with compound commands"/>
598
399</body> 599</body>
400</section> 600</section>
401<section> 601<section>
402<title>Productivity features</title> 602<title>Productivity features</title>
403
404<body> 603<body>
604
605<p>
405<p>So far, we've covered how to move, save and quit, perform simple edits 606So far, we've covered how to move, save and quit, perform simple edits
406and deletions, and use insert mode. With everything listed on the cheat 607and deletions, and use insert mode. With everything listed on the
407sheet so far, you should be able to use vi to perform almost any task.</p> 608cheat sheet so far, you should be able to use vi to perform almost any
609task.
610</p>
611
612<p>
408<p>However, vi also has many more powerful commands. In this section, you'll 613However, vi also has many more powerful commands. In this section,
409 learn how to <e>cut</e>, <e>copy</e> and <e>paste</e>, <e>search</e> and <e>replace</e>, and use <e>autoindent</e> 614you'll learn how to <e>cut</e>, <e>copy</e> and <e>paste</e>,
615<e>search</e> and <e>replace</e>, and use <e>autoindent</e> features.
410features. These commands will help make vi more fun and productive.</p> 616These commands will help make vi more fun and productive.
617</p>
411 618
412</body> 619</body>
413</section> 620</section>
414<section> 621<section>
415<title>Visual mode</title> 622<title>Visual mode</title>
416<body> 623<body>
624
625<p>
417<p>The best way to cut and paste is to use visual mode, a special mode that 626The best way to cut and paste is to use <e>visual mode</e>, a special mode that
418has been added to modern versions of vi, like vim and elvis. You can think 627has been added to modern versions of vi, like vim and elvis. You can think
419of visual mode as a "highlight text" mode. Once the text is highlighted, 628of visual mode as a "highlight text" mode. Once the text is highlighted,
420it can be copied or deleted, and then pasted. If you are using gvim, you 629it can be copied or deleted, and then pasted. If you are using gvim, you
421can highlight by simply dragging the left mouse button over a particular 630can highlight by simply dragging the left mouse button over a particular
422region:</p> 631region:
423<p> 632</p>
424 <figure link="http://www.ibiblio.org/web-gentoo/images/vihighlight.png" short="Highlighted text" caption="VIM with highlighted text"/>
425 633
634<figure link="/images/vihighlight.png" short="Highlighted text" caption="VIM
635with highlighted text"/>
636
426</p> 637<p>
427</body>
428</section>
429<section>
430<title></title>
431<body>
432
433 <p>In addition, you can also enter visual mode by hitting <c>v</c> (this may be your 638In addition, you can also enter visual mode by hitting <c>v</c> (this
434only option if you are using vi from the console.) Then, by moving the cursor 639may be your only option if you are using vi from the console.) Then,
435using movement commands (typically the arrow keys), you'll be able to highlight 640by moving the cursor using movement commands (typically the arrow
641keys), you'll be able to highlight a region of text. Once
436a region of text. Once highlighted, we are ready to cut or copy the text. 642highlighted, we are ready to cut or copy the text.
643</p>
644
437</p> 645<p>
438
439<p>If you're copying the text, hit <c>y</c> (which stands for "yank"). If you're cutting 646If you're copying the text, hit <c>y</c> (which stands for "yank").
440 the text, hit <c>d</c>. You'll be placed back in command mode. Now, move to the position 647If you're cutting the text, hit <c>d</c>. You'll be placed back in
648command mode. Now, move to the position where you'd like to insert
441 where you'd like to insert the cut or copied text, and hit <c>P</c> to insert after the cursor, 649the cut or copied text, and hit <c>P</c> to insert before the cursor,
442 or <c>p</c> to insert before the cursor. Voila, the cut/copy and paste is complete! 650or <c>p</c> to insert after the cursor. Voila, the cut/copy and
443Test out several copy/cut and paste operations before advancing to the next section. 651paste is complete! Test out several copy/cut and paste operations
652before advancing to the next section.
444</p> 653</p>
445 654
446</body> 655</body>
447</section> 656</section>
448<section> 657<section>
449<title>Replacing text</title> 658<title>Replacing text</title>
450<body> 659<body>
660
661<p>
451 <p>To replace patterns of text, we use <e>ex</e> mode. If you'd like to replace the first pattern 662To replace patterns of text, we use <e>ex</e> mode. If you'd like to
452 that appears on the current line, type <c>:s/&lt;regexp&gt;/&lt;replacement&gt;/</c> and hit <c>&lt;ENTER&gt;</c>, where &lt;regexp&gt; 663replace the first pattern that appears on the current line, type
664<c>:s/&lt;regexp&gt;/&lt;replacement&gt;/</c> and hit
665<c>&lt;ENTER&gt;</c>, where &lt;regexp&gt; is the pattern you'd like
453is the pattern you'd like to match and &lt;replacement&gt; is the replacement string. To replace all 666to match and &lt;replacement&gt; is the replacement string. To
454matches on the current line, type <c>:s/&lt;regexp&gt;/&lt;replacement&gt;/g</c> and hit enter. To replace every 667replace all matches on the current line, type
455occurence of this pattern in your file (normally what you want), type <c>:%s/&lt;regexp&gt;/&lt;replacement&gt;/g</c>. 668<c>:s/&lt;regexp&gt;/&lt;replacement&gt;/g</c> and hit enter. To
669replace every occurence of this pattern in your file (normally what
670you want), type <c>:%s/&lt;regexp&gt;/&lt;replacement&gt;/g</c>. If
456If you'd like to do a global replace, but have vi prompt you for each change, type 671you'd like to do a global replace, but have vi prompt you for each
457<c>:%s/&lt;regexp&gt;/&lt;replacement&gt;/gc</c> (stands for "confirm") and hit <c>&lt;ENTER&gt;</c>.</p> 672change, type <c>:%s/&lt;regexp&gt;/&lt;replacement&gt;/gc</c> (stands
673for "confirm") and hit <c>&lt;ENTER&gt;</c>.
674</p>
458 675
459</body> 676</body>
460</section> 677</section>
461<section> 678<section>
462<title>Indentation</title> 679<title>Indentation</title>
463<body> 680<body>
681
682<p>
464<p>vi supports autoindentation, for when you are editing source code. Most modern versions 683vi supports autoindentation, for when you are editing source code.
465of vi (like vim) will auto-enable autoindent mode when you are editing a source file (like a .c 684Most modern versions of vi (like vim) will auto-enable autoindent mode
466file, for example). When autoindent is enabled, you can use <c>&lt;CTR&gt;d</c> (control-d) to move one indent 685when you are editing a source file (like a .c file, for example).
686When autoindent is enabled, you can use <c>&lt;CTR&gt;d</c>
687(control-d) to move one indent level to the left, and
467level to the left, and <c>&lt;CTR&gt;t</c> (control-t) to move one indent level to the right. If autoindent 688<c>&lt;CTR&gt;t</c> (control-t) to move one indent level to the right.
468wasn't enabled automatically, you can manually enable it by typing in the <e>ex</e> command <c>:set</c> autoindent. 689If autoindent wasn't enabled automatically, you can manually enable it
690by typing in the <e>ex</e> command <c>:set autoindent</c>. You can
469You can also tell vi to set the tab size to your favorite setting by using the <c>:set tabstop</c> command; 691also tell vi to set the tab size to your favorite setting by using the
470<c>:set tabstop=4</c> is quite popular.</p> 692<c>:set tabstop</c> command; <c>:set tabstop=4</c> is quite popular.
693</p>
471 694
472</body> 695</body>
473</section> 696</section>
474<section> 697<section>
475<title>Our final cheat sheet</title> 698<title>Our final cheat sheet</title>
476<body> 699<body>
477<p>Well, we've reached the end of the vi tutorial! After adding all the advanced editing commands
478to your cheat sheet, it should look like this:</p>
479<p>
480 <figure link="http://www.ibiblio.org/web-gentoo/images/vicheat-final.png" short="Cheat Sheet" caption="Final cheet sheet"/>
481 700
482</p> 701<p>
702Well, we've reached the end of the vi tutorial! After adding all the
703advanced editing commands to your cheat sheet, it should look like
704this:
705</p>
483 706
707<figure link="/images/vicheat-final.png" short="Cheat Sheet" caption="Final
708cheet sheet"/>
709
710<p>
484<p>Keep your cheat sheet handy, and begin using vi to edit files and compose emails. Refer to the 711Keep your cheat sheet handy, and begin using vi to edit files and
485cheat sheet when needed; you'll find that within the week, you'll have nearly all the commands 712compose emails. Refer to the cheat sheet when needed; you'll find
713that within the week, you'll have nearly all the commands memorized
486memorized and your vi productivity will shoot through the roof!</p> 714and your vi productivity will shoot through the roof!
715</p>
716
717<p>
718If you want to use vi as your default editor make the following change
719to <path>/etc/rc.conf</path>:
720</p>
721
722<pre caption="Setting vi as the default editor">
723<comment>(Set EDITOR to your preferred editor.)</comment>
724#EDITOR="/bin/nano"
725EDITOR="/usr/bin/vim"
726#EDITOR="/usr/bin/emacs"
727</pre>
487 728
488</body> 729</body>
489</section> 730</section>
490<section> 731<section>
491<title>Resources</title> 732<title>Resources</title>
492<body> 733<body>
734
735<p>
493<p>Here are some resources you may find helpful as you continue to learn more about vi:</p> 736Here are some resources you may find helpful as you continue to learn
737more about vi:
738</p>
739
494<ul> 740<ul>
495<li><uri link="http://www.thomer.com/thomer/vi/vi.html">The vi Lovers Home Page</uri>, an excellent resource for all 741 <li>
496things vi.</li> 742 <uri link="http://www.thomer.com/thomer/vi/vi.html">The vi Lovers
743 Home Page</uri>, an excellent resource for all things vi
744 </li>
745 <li>
497<li><uri link="http://www.vim.org/">The vim homepage</uri> is the place to go for all your vim needs.</li> 746 <uri link="http://www.vim.org/">The vim homepage</uri> is the place
498<li>If you're looking for a good, old-fashioned book, <uri link="http://www.oreilly.com/catalog/vi6/">Learning the vi Editor, 6th Edition</uri> would be an excellent choice. Contains good coverage of vi and vi clones.</li> 747 to go for all your vim needs
748 </li>
749 <li>
750 If you're looking for a good, old-fashioned book, <uri
751 link="http://www.oreilly.com/catalog/vi6/">Learning the vi Editor,
752 6th Edition</uri> would be an excellent choice. Contains good
753 coverage of vi and vi clones.
754 </li>
499</ul> 755</ul>
756
757</body>
758</section>
759<section>
760<title>About this document</title>
761<body>
762
763<p>
764The original version of this article was first published on IBM
765developerWorks, and is property of Westtech Information Services. This
766document is an updated version of the original article, and contains
767various improvements made by the Gentoo Linux documentation team.
768</p>
769
500</body> 770</body>
501</section> 771</section>
502</chapter> 772</chapter>
503</guide> 773</guide>

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.20