Errata

Learning the vi and Vim Editors

Errata for Learning the vi and Vim Editors

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed, PDF, ePub, Mobi,
Page xxv
3rd sub-bullet of 3rd bullet, Elbert's acknowledgements... text is: "Michael Sciacco for showing"

line beginning with:

Michael Sciacco for showing him Microsoft's VS Code.

misspelled Michael's last name (how embarrassing, he's a best friend!)

the line should be with corrected last name:

Michael Ciacco for showing him Microsoft's VS Code.

Elbert Hannah
Elbert Hannah
 
Jan 13, 2022 
Page xix
Second sentence in "Notes" box

"It point outs things that may be of interest..." should be "It points out things that may be of interest".

Note from the Author or Editor:
on page xix, second sentence in "Notes" box, change:

"It point outs things that may be of interest"

to:

"It points out things that may be of interest"

Frederick Riemenschneider  Mar 11, 2022 
Page page 172
2rd paragraph

Is it typographically correct?

In 8th.

VARABC=somevalue VARXYZ=someothervalue MYVIMRC=/path/to/my/vimrc/file
export VARABC VARXYZ MYVIMRC

In 7th.

VARABC=somevalue
VARXYZ=someothervalue
MYVIMRC=myfavoritevimrcfile
export VARABC VARXYZ MYVIMRC

Note from the Author or Editor:
one page 173 (pdf, print), paragraph 5(-ish)

change the line:

VARABC=somevalue VARXYZ=someothervalue MYVIMRC=/path/to/my/vimrc/file

by making it three lines instead of one, breaking the two additional lines on the blanks, should look like:

VARABC=somevalue
VARXYZ=someothervalue
MYVIMRC=/path/to/my/vimrc/file

Chunche Yang  Apr 28, 2022 
Page page 174
Table 8-1

"HOME Go to the first nonblank character of the first line of the file. This differs from CTRL-END in that HOME does not move the cursor to whitespace."

should be

"CTRL-HOME Go to the first nonblank character of the first line of the file. This differs from CTRL-END in that CTRL-HOME does not move the cursor to whitespace."

Note from the Author or Editor:
reader is correct. this is an incorrect statement of which key to use to perform cursor jump.

on page 175 (pdf, print), Table 8-1. For the entry describing the [HOME] key, change

[HOME]

to:

[CTRL-HOME]

for both occurrences in that table entry.

Chunche Yang  Apr 28, 2022 
Page page 198
5rd paragraph

:amenu File.HTML .9999 <TAB>filetype=html<CR> :set filetype=html<CR>

should be

:amenu .9999 File.HTML <TAB>filetype=html<CR> :set filetype=html<CR>

Note from the Author or Editor:
reader's observation is correct, this is a typo (parameters reversed).

on page 198 (pdf, print), middle of page, change line:

:amenu File.HTML .9999 <TAB>filetype=html<CR> :set filetype=html<CR>

to:

:amenu .9999 File.HTML <TAB>filetype=html<CR> :set filetype=html<CR>

Chunche Yang  May 05, 2022 
Page page 232
4rd paragraph

[ CTRL-W ] [ G ]
This splits the window and creates a new window above the current window.

should be:

[ CTRL-W ] [ G ] [ ] ]

It is reference windows.txt of Vim :help :stag.

Note from the Author or Editor:
erratum is confirmed. per description:

page 232, 4th paragraph,

add to line:

[CTRL-W][G]

to make:

[CTRL-W][G][]]

Chunche Yang  Jul 11, 2022 
Page page 243
mark.4

mark.4 ...
Thus, you can fold anywhere within an object—in this case, anywhere within the braces. The vi command would be za{

Is "za{" correct?
I guess, "zf{" maybe.

Note from the Author or Editor:
confirmed erratum. per description:

on page 243, footnote #4, change:

za{

to:

zf{

Chunche Yang  Jul 11, 2022 
Page page.243
2rd paragraph

set statusline += \ %{SetTimeOfDayColors()}

should be

set statusline +=\ %{SetTimeOfDayColors()}

because, Use a slash as a leading character for space.

Note from the Author or Editor:
confirmed erratum. per submission:

page 243, 2nd paragraph change (removing trailing space behind "equals sign" (=)):

set statusline += \ %{SetTimeOfDayColors()}

to:

set statusline +=\ %{SetTimeOfDayColors()}

Chunche Yang  Jul 11, 2022 
Page page.328
2rd paragraph

For instance, to convert lines 25 through 44 of a buffer, enter:
:25,44tohtml

should be

:25,44TOhtml

Note from the Author or Editor:
erratum is correct. per submitted description:

on page 328, 2nd paragraph

change:

:25,44tohtml

to:

:25,44TOhtml

Chunche Yang  Jul 11, 2022 
Page page.466
table

In table, the description of 'cursorline':
"Highlight the screen line of the cursor with CursorRow highlighting."

I search the keyword "CursorRow" in help of Vim, and nothing can be finded.

"CursorRow"

should be

"CursorLine".

Note from the Author or Editor:
erratum is correct. per description:

page 466, in table:

change:

CursorRow

to:

CursorLine

Chunche Yang  Jul 11, 2022 
Page page.469
table

In table, option of scrolloff
scrolloff (s0) 0 (5 in defaults.vim)

scrolloff (s0) "not zero"

should be

scrolloff (so)

Note from the Author or Editor:
erratum is correct, per description:

In table, option of scrolloff
scrolloff (s0) 0 (5 in defaults.vim)

scrolloff (s0) "not zero"

should be

scrolloff (so)

Chunche Yang  Jul 11, 2022 
Page page.177
2rd paragraph

In the text, I am not very clear how this example works.

/ho(use\|me)* /ho(use\|me)\+ /ho\(use\|me\)\+ /ho[use\|me]\+ /ho\v(use|me)
--------+-------------+---------------+------------------+----------------+----------------+
ho X X X X X
home O (me) X O (home) O (home) O (home)
house X X O (house) O (house) O (house)

Note from the Author or Editor:
I have a newly built PDF and do not see anything like what is described in erratum. Can you verify or describe more?

update Nov 9, 2022:

There is a slight misrepresentation in the flagged paragraph -- and it relates to how "magic" works for regular expressions. In this case, the parens used to group the patterns require a preceding "\" (backslash) to force the regular expression to group pattern(s) contained in the parentheses.

So, per the noted paragraph, here is the change I recommend:

on page 177, paragraph 2, change the paragraph text from:

Match one or more of the preceding regular expressions. This is either a single
character or a group of characters enclosed in parentheses. Note the difference
between \+ and *. The * is allowed to match nothing, but with \+ there must be
at least one match. For example, ho(use\|me)* matches ho as well as home and
house, but ho(use\|me)\+ does not match ho.

to:

Match one or more of the preceding regular expressions. This is either a single
character or a group of characters enclosed in parentheses. Note the difference
between \+ and *. The * is allowed to match nothing, but with \+ there must be
at least one match. For example, ho\(use\|me\)* matches ho as well as home and
house, but ho\(use\|me\)\+ does not match ho. (See comments later in list on how
parentheses are used for grouping patterns, i.e., that the preceding backslash
is necessary to indicate "magical" use of parentheses.)

Chunche Yang  Jul 11, 2022 
Page 99
4th paragraph, ex command

The ex command :g/mg[ira]bo$/s/box/s/box/square/g tries to match the end of the line, which cannot succeed with the given example text. Intended was probably :g/mg[ira]box/s/box/square/g.

Note from the Author or Editor:
page 99, 4th paragraph change (Note: change the "$" character to "x"):

:g/mg[ira]bo$/s/box/square/g

to:

:g/mg[ira]box/s/box/square/g

Mario Forner  Apr 20, 2022 
Page 191
Last paragraph on page

Change "GNU/Linx" to "GNU/Linux"

Note from the Author or Editor:
accepted. I find this error immediately after figure 9-13 on page *199*, as opposed to the reported 191 (I am looking at the PDF, but the printed version is the same.

on page 199, last paragraph, change text:

GNU/Linx

to:

GNU/Linux

Ben Hekster  Nov 13, 2022 
Page 191
Figure 9-13

Bottom line of text in Figure is clipped (presumably, the word "menus")

Note from the Author or Editor:
accepted: I find figure 9-13 on page 199 (I'm seeing this in the PDF version), not page 191 as stated in submitted erratum. Figure 9-13 is truncated at the bottom.

If possible, please expand figure 9-13 so the last text line is not cut off.

Ben Hekster  Nov 13, 2022 
Page 301
Line 20

Line 20

"nested" 's font formate " Ubuntu Mono" should change from "Ubuntu Mono" to "Minion Pro" and use "italic"?
( make it looked as same as font such as "group" , "event" and "pattern" )

Note from the Author or Editor:
per description of erratum,

page 301, line 20:

change font of word "nested" to match all other words in the accompanying list.

Also, make same change page 310, line 12. it is the same correction.

sophia  Oct 10, 2022 
Page 315
Second paragraph

Missing space in "ownspellchecker"

Note from the Author or Editor:
accepted, per submitted erratum, do the following:

on page 315, second paragraph, sentence 2. change:

ownspellchecker

to:

own spellchecker

Ben Hekster  Nov 13, 2022 
Page 323
Center of page; paragraph under "elhannah@" heading

In the clause

"you must enter the user's password on the remote machine"

consider changing the preposition "on" to "to" (or potentially, "for"), as in:

"you must enter the user's password to the remote machine"

Note from the Author or Editor:
per submitted erratum, page 323, under table entry "elhannah@", change the text in the clause:

you must enter the user's password on the remote machine

to:

you must enter the user's password for the remote machine

Ben Hekster  Nov 13, 2022 
Page 449
2nd paragraph

snext -> +n +num

With the +n argument, begin editing on line num. Alternatively, num may be a pattern of the form /pattern. {Vim}

should be:

With the +num argument, begin editing on line num. Alternatively, num may be a pattern of the form /pattern. {Vim}

Note from the Author or Editor:
page 449, second paragraph,

change sentence:

With the +n argument, begin editing on line num.

to:

With the +num argument, begin editing on line num.

sophia  Oct 10, 2022