/[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.8 Revision 1.15
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/vi-guide.xml,v 1.15 2008/05/19 19:57:20 swift Exp $ -->
2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3 4
4<guide link = "/doc/en/vi-guide.xml"> 5<guide link="/doc/en/vi-guide.xml">
5<title>Learning vi -- the "cheatsheet" technique</title> 6<title>Learning vi -- the "cheatsheet" technique</title>
7<author title="Author">
6<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">
7<author title="Author"><mail link="stocke2@gentoo.org">Eric Stockbridge</mail></author> 11 <mail link="stocke2@gentoo.org">Eric Stockbridge</mail>
8<author title="Editor"><mail link="bennyc@gentoo.org">Benny Chuang</mail></author> 12</author>
9<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> 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
10<version>1.1.2</version> 23<version>1.1.7</version>
11<date>October 4, 2003</date> 24<date>2005-07-21</date>
12 25
13<chapter> 26<chapter>
14<title>Getting Started</title> 27<title>Getting Started</title>
15<section> 28<section>
16<title>Introduction</title> 29<title>Introduction</title>
17<body> 30<body>
31
18<p> 32<p>
19This 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.
20special accelerated "cheat sheet" method, this tutorial is designed to make you 34Using a special accelerated <e>cheat sheet</e> method, this tutorial is
21a proficient vi user without requiring a huge time commitment. In this vi 35designed to make you a proficient vi user without requiring a huge
22tutorial, 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
23paste text, and use important vim extensions like visual mode and multi-window 38important vim extensions like visual mode and multi-window editing.
24editing.
25</p>
26<p> 39</p>
40
41<p>
27If 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
28to 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
29Linux/UNIX visual editing programs. 44the most popular and powerful Linux/UNIX visual editing programs.
30</p> 45</p>
31 46
32</body> 47</body>
33</section> 48</section>
34<section> 49<section>
35<title>About the guide</title> 50<title>About the guide</title>
36<title>Learning vi -- accelerated</title>
37<body> 51<body>
38<p> 52
39There's one thing in particular that makes it difficult to learn vi -- vi has lots of commands.
40In order to use vi effectively, you need to memorize quite a few. This can take a long time, and
41one of the goals of this tutorial is not to take up a lot of your time. So, initially, we have
42a challenge -- how exactly do I help you to memorize lots of commands in a short period of time?
43</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?
44<p> 60</p>
45To tackle this challenge, as we proceed through this tutorial, we're going to gradually put together 61
46a vi "cheat sheet". This sheet will contain all the important vi commands. After you've completed
47this tutorial, you'll be able to refer to this cheat sheet if you forget a particular command.
48Over time, as you memorize commands, you'll gradually become less and less dependent on the cheat sheet.
49By using the cheat-sheet technique, you'll be able to learn how to use vi faster than ever possible
50before!
51</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
52</body> 73</body>
53</section> 74</section>
54<section> 75<section>
55<title>The learning process</title> 76<title>The learning process</title>
56<body> 77<body>
57 78
79<p>
58<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
59First, 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
60to 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
61the 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
62that 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
63the command onto your cheat sheet will help you to memorize the command. 87cheat sheet will help you to memorize the command.
64</p> 88</p>
89
65</body> 90</body>
66</section> 91</section>
67<section> 92<section>
68<title>Introducing vim</title> 93<title>Introducing vim</title>
69<body> 94<body>
70 95
96<p>
71<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
72version 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
73that 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
74make a note of it.) If you need to install vim, you can get it from <uri link="http://www.vim.org/">www.vim.org</uri>. 100a vim-specific command, I'll make a note of it.) If you need to
75In 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
76command-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
77configured to use the excellent GTK+ gui library. Here's a gvim screenshot 104editor which can be configured to use the excellent GTK+ gui library.
78from my system:</p> 105Here's a gvim screenshot from my system:
106</p>
79 107
80<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"/>
81 109
110<p>
82<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
83from 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>
84 114
85</body> 115</body>
86</section> 116</section>
87</chapter> 117</chapter>
118
88<chapter> 119<chapter>
89<title>First Steps</title> 120<title>First Steps</title>
90<section> 121<section>
91<title>Pick a file</title> 122<title>Pick a file</title>
92<body> 123<body>
124
125<p>
93<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
94a 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
95of 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
96vi 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>
97<pre> 134</pre>
98$ vi myfile.txt 135
99</pre><p>
100If you have vim installed, type "vim myfile.txt". If you'd prefer to use gvim, type
101"gvim myfile.txt". myfile.txt should be the name of a text file on your system.
102</p> 136<p>
103</body> 137If you have vim installed, type <c>vim myfile.txt</c>. If you'd prefer to
104</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>
105 141
142</body>
143</section>
106<section> 144<section>
107<title>Inside vi</title> 145<title>Inside vi</title>
108<body> 146<body>
109 147
148<p>
110<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
111Congratulations -- you're in vi! Unlike many editors, when vi starts up, it is in 150on your screen. Congratulations -- you're in vi! Unlike many
112a 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
113instead 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
114will move one character to the right instead. In command mode, the 154cursor will move one character to the right instead. In command mode,
115characters 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
116characters 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
117let's take a look at some.</p> 157essential types of commands are movement commands; let's take a look
158at some.
159</p>
118 160
119</body> 161</body>
120</section> 162</section>
121</chapter> 163</chapter>
164
122<chapter> 165<chapter>
123<title>Moving around</title> 166<title>Moving around</title>
124<section> 167<section>
125<title>Moving in vi, part 1</title> 168<title>Moving in vi, part 1</title>
126<body> 169<body>
127 170
171<p>
128 <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
129down, 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
130use 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>
131you'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,
132your 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
133around 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
134vi 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
135character. 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.
136</p> 185</p>
137 186
138</body> 187</body>
139</section> 188</section>
140<section> 189<section>
141<title>Moving in vi, part 2</title> 190<title>Moving in vi, part 2</title>
142<body> 191<body>
143 192
193<p>
144<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
145 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
146Try '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
147more 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,
148commands 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>
149 202
203<p>
150<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
151Modern 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.
152</p> 208</p>
153 209
154</body> 210</body>
155</section> 211</section>
156<section> 212<section>
157<title>Word moves, part 1</title> 213<title>Word moves, part 1</title>
158<body> 214<body>
159 <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
160 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
161 of the <i>previous</i> word, press <c>b</c>. Test 'em out.</p>
162</body>
163</section>
164 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>
165<section> 226<section>
166<title>Word moves, part 2</title> 227<title>Word moves, part 2</title>
167<body> 228<body>
229
230<p>
168<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
169considers 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
170vi 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
171five 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>
172<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.
173 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
174This 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
175vi bigword.</p> 243one vi bigword.
244</p>
176 245
177</body> 246</body>
178</section> 247</section>
179<section> 248<section>
180<title>Word moves, part 3</title> 249<title>Word moves, part 3</title>
181<body> 250<body>
182<p>To jump around to the next and previous bigword, you can use a <i>capitalized</i> 251
183 word move command. Use <c>W</c> to jump to the first character of the next bigword, <c>E</c> to jump
184 to the last character of the next bigword, and <c>B</c> to jump to the first character
185of the previous bigword. Test 'em out, and compare the matching word and bigword movement
186commands until you understand their differences.
187</p> 252<p>
188 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>
189 261
190</body> 262</body>
191</section> 263</section>
192<section> 264<section>
193<title>Bigger moves</title> 265<title>Bigger moves</title>
194<body> 266<body>
267
268<p>
195 <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
196 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
197 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
198next. 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>
199 276
200</body> 277</body>
201</section> 278</section>
202</chapter> 279</chapter>
280
203<chapter> 281<chapter>
204<title>quiting</title>
205<section>
206<title>Quitting</title> 282<title>Quitting</title>
283<section>
207<body> 284<body>
285
286<p>
208<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
209to 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
210in 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
211prompt.</p> 291<c>:q!</c>. You should now be at the command prompt.
292</p>
212 293
213<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
214 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
215editing 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
216the <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
217be 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
218to 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>
219 305
220</body> 306</body>
221</section> 307</section>
222</chapter> 308</chapter>
309
223<chapter> 310<chapter>
224<title>The Cheat Sheet</title> 311<title>The Cheat Sheet</title>
225<section> 312<section>
226<title>The beginnings of the cheat sheet</title> 313<title>The beginnings of the cheat sheet</title>
227<body> 314<body>
315
316<p>
228<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
229cheat 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
230onto 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
231we'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
232sheet.</p> 322possible so that we can fit everything on one sheet.
323</p>
233 324
234<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"/>
235 327
236</body> 328</body>
237
238</section> 329</section>
239<section> 330<section>
240<title>Miscellaneous vi</title> 331<title>Miscellaneous vi</title>
241
242<body> 332<body>
243<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
244<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>
245&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
246fret -- 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
247you 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
248be 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
249<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
250commands 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>
251 359
252</body> 360</body>
253</section> 361</section>
254</chapter> 362</chapter>
363
255<chapter> 364<chapter>
256<title>Saving and Editing</title> 365<title>Saving and Editing</title>
257<section> 366<section>
258<title>Save and save as...</title> 367<title>Save and save as...</title>
259<body> 368<body>
369
370<p>
260<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
261changes, 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>
262save 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
263<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>.
264</body> 376</p>
265</section>
266 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>
267<section> 390<section>
268<title>Simple edits</title> 391<title>Simple edits</title>
269<body> 392<body>
393
394<p>
270<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.
271we'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
272more 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
273you 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.
274<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
275will 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
276somewhere 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
277vi 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
278<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
279Finally, move to any line in the file and 410original character has been replaced. Finally, move to any line in
280type <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>
281 414
282</body> 415</body>
283</section> 416</section>
284<section> 417<section>
285<title>Repeating and deleting</title> 418<title>Repeating and deleting</title>
286<body> 419<body>
420
421<p>
287 <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
288 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
289another handy shortcut. 425with another handy shortcut.
426</p>
427
290</p> 428<p>
291<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
292 <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
293 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
294 <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
295</body> 438</body>
296</section> 439</section>
297<section> 440<section>
298<title>Undo!</title> 441<title>Undo!</title>
299<body> 442<body>
300<p>Now that we're experimenting with deletion, it would be a good time to learn how to undo any changes. 443
301 By pressing <c>u</c>, the original version of vi allowed you to undo the last edit only. However, modern versions
302 of vi like vim will allow you to repeatedly press <c>u</c> to continue to undo changes to your file. Try combining
303 some <c>d</c> and <c>u</c> commands together.
304</p> 444<p>
305</body> 445Now that we're experimenting with deletion, it would be a good time to
306</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>
307 452
453</body>
454</section>
308<section> 455<section>
309<title>Updating the cheat sheet</title> 456<title>Updating the cheat sheet</title>
310<body> 457<body>
458
459<p>
311<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
312cheat sheet should look like this:</p> 461covered so far, your cheat sheet should look like this:
462</p>
313 463
314 <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"/>
315 466
316</body> 467</body>
317</section> 468</section>
318</chapter> 469</chapter>
470
319<chapter> 471<chapter>
320<title>Insert mode</title> 472<title>Insert mode</title>
321<section> 473<section>
322<title>Insert mode</title>
323
324<body> 474<body>
475
476<p>
325<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
326operations. 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
327was 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
328become 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
329</p> 485<p>
330<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
331other 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
332command 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
333before 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
334Remember, 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
335</body> 496</body>
336</section> 497</section>
337<section> 498<section>
338<title>Benefits of insert mode</title> 499<title>Benefits of insert mode</title>
339<body> 500<body>
340 <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
341 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>
342 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
343the 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
344and leaving insert mode</p> 510leaving insert mode.
511</p>
512
345</body> 513</body>
346</section> 514</section>
347<section> 515<section>
348<title>Insert options</title> 516<title>Insert options</title>
349<body> 517<body>
518
519<p>
350 <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,
351 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
352 <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
353 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
354create 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>
355press <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
356everything 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>
357<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
358 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.
359</p> 537</p>
360 538
361</body> 539</body>
362</section> 540</section>
363<section> 541<section>
364<title>Changing text</title> 542<title>Changing text</title>
365<body> 543<body>
366 <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
367 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>
368 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
369leaves 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
370movement 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> .)
371</p> 555</p>
372 556
373</body> 557</body>
374</section> 558</section>
375</chapter> 559</chapter>
560
376<chapter> 561<chapter>
377<title>Compound Commands</title> 562<title>Compound Commands</title>
378<section> 563<section>
379<title>Compound commands</title>
380<body> 564<body>
381 <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
382In 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
383<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:
384examples: <c>12b</c>, <c>4j</c>.</p> 572<c>12b</c>, <c>4j</c>.
573</p>
574
575<p>
385<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,
386 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
387 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
388how 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,
389to edit files at blazing speed.</p> 582you'll be able to edit files at blazing speed.
583</p>
390 584
391</body> 585</body>
392</section> 586</section>
393<section> 587<section>
394<title>Updating the cheat sheet</title> 588<title>Updating the cheat sheet</title>
395<body> 589<body>
590
591<p>
396<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:
397<p> 594</p>
398 <figure link="http://www.ibiblio.org/web-gentoo/images/vicheat-compound.png" short="Cheat Sheet" caption="Cheat sheet with compound commands"/>
399 595
400</p> 596<figure link="/images/vicheat-compound.png" short="Cheat Sheet" caption="Cheat
597sheet with compound commands"/>
598
401</body> 599</body>
402</section> 600</section>
403<section> 601<section>
404<title>Productivity features</title> 602<title>Productivity features</title>
405
406<body> 603<body>
604
605<p>
407<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
408and deletions, and use insert mode. With everything listed on the cheat 607and deletions, and use insert mode. With everything listed on the
409sheet 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>
410<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,
411 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.
412features. These commands will help make vi more fun and productive.</p> 616These commands will help make vi more fun and productive.
617</p>
413 618
414</body> 619</body>
415</section> 620</section>
416<section> 621<section>
417<title>Visual mode</title> 622<title>Visual mode</title>
418<body> 623<body>
624
625<p>
419<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
420has 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
421of 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,
422it 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
423can highlight by simply dragging the left mouse button over a particular 630can highlight by simply dragging the left mouse button over a particular
424region:</p> 631region:
425<p> 632</p>
426 <figure link="http://www.ibiblio.org/web-gentoo/images/vihighlight.png" short="Highlighted text" caption="VIM with highlighted text"/>
427 633
634<figure link="/images/vihighlight.png" short="Highlighted text" caption="VIM
635with highlighted text"/>
636
428</p> 637<p>
429</body>
430</section>
431<section>
432<title></title>
433<body>
434
435 <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
436only 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,
437using 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
438a 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
439</p> 645<p>
440
441<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").
442 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
443 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,
444 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
445Test 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.
446</p> 653</p>
447 654
448</body> 655</body>
449</section> 656</section>
450<section> 657<section>
451<title>Replacing text</title> 658<title>Replacing text</title>
452<body> 659<body>
660
661<p>
453 <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
454 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
455is 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
456matches 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
457occurence 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
458If 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
459<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>
460 675
461</body> 676</body>
462</section> 677</section>
463<section> 678<section>
464<title>Indentation</title> 679<title>Indentation</title>
465<body> 680<body>
681
682<p>
466<p>vi supports autoindentation, for when you are editing source code. Most modern versions 683vi supports autoindentation, for when you are editing source code.
467of 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
468file, 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
469level 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.
470wasn'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
471You 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
472<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>
473 694
474</body> 695</body>
475</section> 696</section>
476<section> 697<section>
477<title>Our final cheat sheet</title> 698<title>Our final cheat sheet</title>
478<body> 699<body>
479<p>Well, we've reached the end of the vi tutorial! After adding all the advanced editing commands
480to your cheat sheet, it should look like this:</p>
481<p>
482 <figure link="http://www.ibiblio.org/web-gentoo/images/vicheat-final.png" short="Cheat Sheet" caption="Final cheet sheet"/>
483 700
484</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>
485 706
707<figure link="/images/vicheat-final.png" short="Cheat Sheet" caption="Final
708cheet sheet"/>
709
710<p>
486<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
487cheat 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
488memorized 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>
489 728
490</body> 729</body>
491</section> 730</section>
492<section> 731<section>
493<title>Resources</title> 732<title>Resources</title>
494<body> 733<body>
734
735<p>
495<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
496<ul> 740<ul>
497<li><uri link="http://www.thomer.com/thomer/vi/vi.html">The vi Lovers Home Page</uri>, an excellent resource for all 741 <li>
498things 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>
499<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
500<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>
501</ul> 755</ul>
756
502</body> 757</body>
503</section> 758</section>
504<section> 759<section>
505<title>About this document</title> 760<title>About this document</title>
506<body> 761<body>

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

  ViewVC Help
Powered by ViewVC 1.1.20