/[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.5 Revision 1.6
3<guide link = "/doc/en/vi-guide.xml"> 3<guide link = "/doc/en/vi-guide.xml">
4<title>Learning vi -- the "cheatsheet" technique</title> 4<title>Learning vi -- the "cheatsheet" technique</title>
5<author title="Author"><mail link="drobbins@gentoo.org">Daniel Robbins</mail></author> 5<author title="Author"><mail link="drobbins@gentoo.org">Daniel Robbins</mail></author>
6<author title="Author"><mail link="stocke2@gentoo.org">Eric Stockbridge</mail></author> 6<author title="Author"><mail link="stocke2@gentoo.org">Eric Stockbridge</mail></author>
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> 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>
8<version>1.1</version> 8<version>1.1.1</version>
9<date>21 Apr 2003</date> 9<date>19 May 2003</date>
10 10
11<chapter> 11<chapter>
12<title>Getting Started</title> 12<title>Getting Started</title>
13<section> 13<section>
14<title>Introduction</title> 14<title>Introduction</title>
67<body> 67<body>
68 68
69<p>There are many versions of vi, and I'm going to be showing you how to use a 69<p>There are many versions of vi, and I'm going to be showing you how to use a
70version of vi called "vim". vim is very popular and has a number of extensions 70version of vi called "vim". vim is very popular and has a number of extensions
71that make vi a lot nicer (whenever I demonstrate a vim-specific command, I'll 71that make vi a lot nicer (whenever I demonstrate a vim-specific command, I'll
72make a note of it.) If you need to install vim, you can get it from <uri href="http://www.vim.org">http://www.vim.org</uri>. 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>.
73In addition to an enhanced 73In addition to an enhanced
74command-line vi, vim also comes with gvim, a nice graphical editor which can be 74command-line vi, vim also comes with gvim, a nice graphical editor which can be
75configured to use the excellent GTK+ gui library. Here's a gvim screenshot 75configured to use the excellent GTK+ gui library. Here's a gvim screenshot
76from my system:</p> 76from my system:</p>
77 77
78<figure link="http://www.ibiblio.org/pub/Linux/distributions/gentoo/images/vishot.png" short="screenshot" caption="VIM screenshot"/> 78<figure link="http://www.ibiblio.org/web-gentoo/images/vishot.png" short="screenshot" caption="VIM screenshot"/>
79 79
80<p>If you're a vi newbie, try to get gvim running on your system. Using vi 80<p>If you're a vi newbie, try to get gvim running on your system. Using vi
81from a gui can make things a bit easier for beginners.</p> 81from a gui can make things a bit easier for beginners.</p>
82 82
83</body> 83</body>
227cheat sheet, you'll need a US letter or A4 sized piece of paper (we're going to pack a lot of info 227cheat sheet, you'll need a US letter or A4 sized piece of paper (we're going to pack a lot of info
228onto this sheet!) Here's a picture of my cheat sheet after I've transcribed all the commands that 228onto this sheet!) Here's a picture of my cheat sheet after I've transcribed all the commands that
229we've covered so far. Try to follow my layout if possible so that we can fit everything on one 229we've covered so far. Try to follow my layout if possible so that we can fit everything on one
230sheet.</p> 230sheet.</p>
231 231
232<figure link="http://www.ibiblio.org/pub/Linux/distributions/gentoo/images/vicheat-first.png" short="First part of the cheat sheet" caption="Cheat Sheet"/> 232<figure link="http://www.ibiblio.org/web-gentoo/images/vicheat-first.png" short="First part of the cheat sheet" caption="Cheat Sheet"/>
233 233
234</body> 234</body>
235 235
236</section> 236</section>
237<section> 237<section>
307<title>Updating the cheat sheet</title> 307<title>Updating the cheat sheet</title>
308<body> 308<body>
309<p>Time to update the cheat sheet! After adding all the commands we've covered so far, your 309<p>Time to update the cheat sheet! After adding all the commands we've covered so far, your
310cheat sheet should look like this:</p> 310cheat sheet should look like this:</p>
311 311
312 <figure link="http://www.ibiblio.org/pub/Linux/distributions/gentoo/images/vicheat-edit.png" short="Cheat sheet" caption="Cheat sheet with editing commands"/> 312 <figure link="http://www.ibiblio.org/web-gentoo/images/vicheat-edit.png" short="Cheat sheet" caption="Cheat sheet with editing commands"/>
313 313
314</body> 314</body>
315</section> 315</section>
316</chapter> 316</chapter>
317<chapter> 317<chapter>
391<section> 391<section>
392<title>Updating the cheat sheet</title> 392<title>Updating the cheat sheet</title>
393<body> 393<body>
394<p>Time to update the cheat sheet again. Here's what it looks like so far:</p> 394<p>Time to update the cheat sheet again. Here's what it looks like so far:</p>
395<p> 395<p>
396 <figure link="http://www.ibiblio.org/pub/Linux/distributions/gentoo/images/vicheat-compound.png" short="Cheat Sheet" caption="Cheat sheet with compound commands"/> 396 <figure link="http://www.ibiblio.org/web-gentoo/images/vicheat-compound.png" short="Cheat Sheet" caption="Cheat sheet with compound commands"/>
397 397
398</p> 398</p>
399</body> 399</body>
400</section> 400</section>
401<section> 401<section>
419of visual mode as a "highlight text" mode. Once the text is highlighted, 419of 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 420it 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 421can highlight by simply dragging the left mouse button over a particular
422region:</p> 422region:</p>
423<p> 423<p>
424 <figure link="http://www.ibiblio.org/pub/Linux/distributions/gentoo/images/vihighlight.png" short="Highlighted text" caption="VIM with highlighted text"/> 424 <figure link="http://www.ibiblio.org/web-gentoo/images/vihighlight.png" short="Highlighted text" caption="VIM with highlighted text"/>
425 425
426</p> 426</p>
427</body> 427</body>
428</section> 428</section>
429<section> 429<section>
475<title>Our final cheat sheet</title> 475<title>Our final cheat sheet</title>
476<body> 476<body>
477<p>Well, we've reached the end of the vi tutorial! After adding all the advanced editing commands 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> 478to your cheat sheet, it should look like this:</p>
479<p> 479<p>
480 <figure link="http://www.ibiblio.org/pub/Linux/distributions/gentoo/images/vicheat-final.png" short="Cheat Sheet" caption="Final cheet sheet"/> 480 <figure link="http://www.ibiblio.org/web-gentoo/images/vicheat-final.png" short="Cheat Sheet" caption="Final cheet sheet"/>
481 481
482</p> 482</p>
483 483
484<p>Keep your cheat sheet handy, and begin using vi to edit files and compose emails. Refer to the 484<p>Keep your cheat sheet handy, and begin using vi to edit files and compose emails. Refer to the
485cheat sheet when needed; you'll find that within the week, you'll have nearly all the commands 485cheat sheet when needed; you'll find that within the week, you'll have nearly all the commands
492<body> 492<body>
493<p>Here are some resources you may find helpful as you continue to learn more about vi:</p> 493<p>Here are some resources you may find helpful as you continue to learn more about vi:</p>
494<ul> 494<ul>
495<li><uri link="http://www.thomer.com/thomer/vi/vi.html">The vi Lovers Home Page</uri>, an excellent resource for all 495<li><uri link="http://www.thomer.com/thomer/vi/vi.html">The vi Lovers Home Page</uri>, an excellent resource for all
496things vi.</li> 496things vi.</li>
497<li><uri link="http://www.vim.org">The vim homepage</uri> is the place to go for all your vim needs.</li> 497<li><uri link="http://www.vim.org/">The vim homepage</uri> is the place to go for all your vim needs.</li>
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> 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>
499</ul> 499</ul>
500</body> 500</body>
501</section> 501</section>
502</chapter> 502</chapter>

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

  ViewVC Help
Powered by ViewVC 1.1.20