---------------------------------------------------- Chapter 8 Reading Guide - A Practical Guide to Linux ---------------------------------------------------- -IAN! idallen@ncf.ca Here is a Reading Guide and some review questions for Chapter 8 "The VI Editor". Also important reading: file "vi_basics.txt" under the Notes buttons. Chapter 8 - The VI Editor. Omit all the "optional" material in this chapter on first reading. The textbook documents "nvi", an early (1997) version of a VI-like editor. Most Linux distributions these days carry "vim" (VI iMproved), which was derived from "steVIe". Most of the basic commands in all versions of "vi" are the same. Do not use the arrow keys to move the cursor - use the command-mode letters h,j,k,l instead. The letters don't require you to move your hands from the home row on your keyboard, and they encourage you to remain in command mode where you can use all the VIM commands. Arrow keys will slow you down, and other Unix programmers will make rude remarks about you. Read: p.201-211 (use h,j,k,l and not the arrow keys!) p.206 - in vim use ":help u" not ":viusage u". p.207 - in vim use ":help :!" not ":exusage !". p.207 - ignore the "ex" modes in vim on first reading p.207 - reread the CAUTION box! p.208 - CONTROL-R does a redo (after undo), not "clear screen" p.209 - vim uses CONTROL-A/CONTROL-X to increment/decrement numbers p.210 - ignore the split screen / background/foreground sections Read: p.212-219 p.217 - CONTROL-R does a redo (after undo), not "clear screen" p.217 - in vim "u" always does undo; use CONTROL-R to redo Read: p.220 - (one page) basic searching using /pattern, n, and N learn the special pattern characters ^ and $ (just like in grep) omit the material on other special pattern characters on first reading Note: p.222 - in vim CONTROL-A increments a number, use * to search forward (omit this) Read: p.222-223 basic substitution :1,$s/pattern/new string/ learn the special pattern characters ^ and $ (just like in grep) omit the material on other special pattern characters on first reading Read: p.224 - join J , status ^G , and repeat . Read: p.224-225 - yank and put omit material on named buffers on first reading Read: p.226-227 - read, write, identify file Omit the rest of the chapter and read the relevant parts of the Summary pages p.237-242. ---------------- Review Questions ---------------- - Chapter 8 non-Advanced Review Questions: On ACADUNIX or Linux: 1 - 10 (all) - Chapter 8 Advanced Review Questions: none (but read the paragraph Advice, above)