By Developers, For Developers

Historical errata for Modern Vim

PDF PgPaper PgTypeDescriptionFixed onComments
13ERROR

After running `:helptags $VIMCONFIG/pack` (using neovim), `:help unimpaired` continues to state that there is no help for unimpaired. I do, however, have a file `~/.config/nvim/pack/tags` that contains tags for the unimpaired plugin. Restarting nvim does not seem to make a difference.

###
:version
NVIM v0.2.0
Build type: Release
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -DNDEBUG -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -st
d=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -I/tmp/neovim-20170707-80027-1bg0wcx/neovim-0.2.0/build/config -I/tmp/neovim-20170707-80027-1bg0wcx/neovim-0.2.0/src -I/usr/local/include -I/
usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/tmp/neovim-20170707-80027-1bg0wcx/neovim-0.2.0/build/src/nvim/auto -I/tmp/neovim-2017
0707-80027-1bg0wcx/neovim-0.2.0/build/include
Compiled by brew@Sierra-2.local

Optional features included (+) or not (-): +acl +iconv +jemalloc +tui
For differences from Vim, see :help vim-differences

system vimrc file: “$VIM/sysinit.vim”
fall-back for $VIM: “/usr/local/Cellar/neovim/0.2.0_1/share/nvim”
###

2017-12-04Thanks for reporting this. Can you try running `:helptags ALL` and see if that works? \n \nIn an earlier draft, I recommended using `:helptags ALL`. I think this is more likely to work for everyone, although some people reported that they saw permissions errors when using that command. I thought that `:helptags $VIMCONFIG/pack` was a good workaround to avoid the permissions errors, but I see now that it has problems of it's own.
13ERROR

:helptags doesn’t seem to descend into subdirectories recursively; at least, :helptags /.vim/pack" didn’t work to load the tags from/.vim/pack/bundle/start/vim-unimpaired. Fortunately, ALL" did, since vim-unimpaired was in the runtimepath. (Homebrew-installed vim 8.0.997 +huge on macOS)

2017-12-04Thanks for reporting this. \n \nIn earlier draft, I recommended using :helptags ALL. Some of my tech reviewers reported seeing permissions errors when they used that command (the error messages seem alarming, but the command still works). I thought that `:helptags $VIMCONFIG/pack` was a good workaround to avoid the permissions errors, but I see now that it has problems of it's own. \n \nI think I'll revert to recommending :helptags ALL, or possibly :silent helptags ALL to prevent the error messages...
71TYPO

Should `seemlessly` be `seamlessly`? Also PDF page 81.

2017-12-01Yes!
96SUGGEST

For session handling, I’d recommend `using xolox’s vim-session plugin,
xolox/vim-session. This plugin has the xolox/vim-misc plugin (which has some nice utilities) as a dependency. This plugin allows you to simply use a session name instead of a full path.

2018-03-05
15TYPO

I think the references to `$VIMCONFIG/pack/start` and `$VIMCONFIG/pack/opt` in “Updating Plugins in Your Package” should be `$VIMCONFIG/pack/bundle/start` and `$VIMCONFIG/pack/bundle/opt` respectively (unless I’ve misunderstood how packages work!).

2017-12-04Good catch!
22TYPO

Says:
export $PATH=$PATH:$VIMCONFIG/pack/bundle/start/fzf/bin

Should be:
export PATH=$PATH:$VIMCONFIG/pack/bundle/start/fzf/bin

(No $)

2017-12-04Good catch!
23ERROR

When I copy “git add .” it’s paste “gitadd.”

2018-03-05I suspect that this is a general issue with copy/pasting text from PDFs, rather than a specific issue with this book. I've been able to reproduce the issue that you describe, but I can't think of any way of fixing it. (The source text that the PDF is generated from certainly has spaces between "git" and "add" and the dot.) \n \nPerhaps I should address this in the introduction to the book by advising the reader to type out commands by hand (a la Zed Shaw in "Learn Python the hard way").
51SUGGEST

Hello,

In the “Using the location list” section:

> If you already have muscle memory for using these built-in commands you’ll find them appealing, but don’t overlook the ale_previous and ale_next traversal commands provided by ALE. Unlike the location list equivalents, these take your cursor position into account.

It’s unclear to me what you mean by “these take your cursor position into account”.

When it use unimpaired loclist bindings (“[l”, “]l”, “[L”, “]L”), it does move my cursor to expected place in the line. This makes me thing that I misunderstood what advantages “ale_first”, “ale_last”… are. Perhaps this could be clarified?

Great book. :)

2018-03-05Here's an example to illustrate: say you have a buffer open and you have entries in the location list at line 1, line 11, and line 21. You use :lfirst which puts your cursor on line 1. Then you use :lnext which puts your cursor on line 11. Then you move your cursor up a couple of lines, leaving it on line 8. Now if you use :lnext again, you jump to line 21 - there's a certain logic to that, but I always find it a little bit jarring. I expect to jump to the next entry after my cursor position, and that's exactly how the ale_next mappings works. \n \nI was hoping that I could get away without having to spell out the differences so explicitly (because it takes a lot of words to do it!). It looks like I will have to spell it out after all.
xivSUGGEST

The chapter describes how to use factory settings for vim. The way of the author is to rename vimrc files. But would it not be easier to use the command line switch -u DEFAULTS?

2017-12-02A similar suggestion came up in the forums: https://forums.pragprog.com/forums/478/topics/15647 \n \nI've given a detailed response there so I won't repeat it here.
13TYPO

“exectue” bottom page

2018-02-05
xviTYPO

“which where” in the “Downloading the examples” section should probably be “which is where”

2018-02-05
91,96TYPO

A couple of instances of your which should be you are or you’re:

P81, it doesn’t matter if your in Normal mode
P96, You need to put down what your doing

2018-02-05
6SUGGEST

“In Vim 8, you can have support for either Python 2 or Python 3. ”

Not strictly true. The Windows version supports dynamic loading of Python, and allows both Python 2 and 3 at the same time (although I’ve never got integration working) and the Cygwin version also supports dynamic loading of both versions of python (which does work for me).

2018-03-05
13xiiTYPO

“exectue” in this sentence: “In this mode, you can type out Ex commands such as :write and :quit, using the key to exectue the command.”

2018-02-05
28 13TYPO

“which describes a mechanisms” => “which describes a mechanism” ?

2018-02-05
30TYPO

“Try running the :Scriptnames command to see for yourself”

=> that should be “:scriptnames” ?

2018-02-05
13SUGGEST

Hi Drew,
On page 13 you state that it is necessary to restart vim after installing a plugin. Apparently this is not really necessary. On stackexchange I found a question about the same thing and the answer was to use the “:packloadall” command.
I didn’t test it myself, but this might be a nice addition.

Regards, David

2018-03-05
51ERROR

:echo join(split(&runtimepath, ‘,’), “\
”)
No reference whatsoever to vim-unimpaired.

I have removed all references to tpopes previous `pathogen`
I have removed any and all .vimrc, autoload’s

2018-03-06I'm sorry but I don't understand this bug report.
76TYPO

" See Tip 18, Using Normal Mode Commands in a Terminal Buffer, on page 82 for examples." - should be “example.”

2018-03-05
136TYPO

in the last paragraph, “Virtual Studio Code” instead of “Visual Studio Code”

43TYPO

In the section “Capturing Compiler Output with :make” of Tip 10 the following text is being repeated on the .mobi:

“”"
output, use the break-things.diff patch and run :make again. To inspect
the output from the build, open the quickfix window:

➾ :copen

You can traverse the list of errors using the commands: :cfirst , :cprev , :cnext ,
:clast . These commands allow you to quickly jump between errors, fixing them
as you go.
“”"

I am reading the .mobi using the Kindle app on Android and I’ve uploaded it to my documents using the Kindle email for my device.

I don’t see the text being repeated on the PDF.

44TYPO

The beginning of the section “Running :make Asynchronously” of Tip 10 is missing on the .mobi file. I am reading using the Kindle app on an Android device.

There is no section title and the first paragraph is like the following:

“”"
to this command: It runs synchronously. That means you can’t
interact with Vim until the build completes. This is of little consequence if
your build completes quickly, but for long-running builds, it can interrupt
your workflow.
“”"

66TYPO

“For convenience, I’d suggest creating a Normal mode mapping by adding this line to your vimrc file:

fzf-mappings.vim
​ \tnnoremap <C-​p​> :<C-​u​>FZF

Ambigous, do we create this file fzf-mappings.vim? How is it called and when?
It does not work.

28TYPO

```
Select previous item from matchlist
Select next item from matchlist
```

should be:

```
Select next item from matchlist
Select previous item from matchlist
```

17ERROR

“:scriptnames” should be “:Scriptnames”.

The capitalized command is part of the vim-scriptease plugin while the lowercase command is built into Vim.

29TYPO

The page reference to page xi should be page xii.

214SUGGEST

I had some problems installing neovim on Ubuntu (WSL) from the PPA, when I directly followed the provided instructions.

I suggest you change this:

➾ $ sudo add-apt-repository ppa:neovim-ppa/stable
➾ $ sudo apt-get install neovim

… to this:

➾ $ sudo add-apt-repository ppa:neovim-ppa/stable
➾ $ sudo apt-get update
➾ $ sudo apt-get install neovim

4126TYPO

In the “How Does Fuzzy Matching Work?” paragraph:

With the query “to,” the list is filtered to only include filepaths containing the letter “t” followed by the letter “o.”

I think the punctuation marks such as comma and dot should be taken out of the double quotes, so to read:

With the query “to”, the list is filtered to only include filepaths containing the letter “t” followed by the letter “o”.

528kERROR

Reading this on Kindle, so it’s position 528:

If you install neovim-remote according to the instructions, it won’t work: Omit the —user flag in the invocation of “pip install” and it will. Alternatively, you must add something to your path, which probably varies based on platform.

15SUGGEST

Outdated vim-unimpaired mapping ‘=on’
Current vim-unimpaired mapping ‘yon’

vim-unimpaired has changed its mapleader for toggles from ‘=o’ and ‘co’ to ‘yo’. The doc got updated in the commit
82075329f15ec23b8600cade727e6a152f9c1fb6 (9 May 2018)

The stable release 2.0 from 2018-07-27 only provides the new leader ‘yo’. The stable release is available from
vimorg/scripts/script.php?script_id=1590.

The legacy maps ‘=o’ and ‘co’ are currently still supported by following git HEAD
as described in commit d6325994b3c16ce36fd494c47dae4dab8d21a3da
However, I would still advice to change this in this book.

1996ERROR

In Tip 13, (page number is near the location in the kindle version)
:set grepformat=$f:$l:%c:%m

This didn’t work and quickfix could not parse the results. I had to change the $ symbols to % and then it worked. I’m reading on kindle cloud reader with a purchase from the kindle store. To be clear, the line that worked was:

:set grepformat=%f:%l:%c:%m

53ERROR

In the Vim commands given to correct the errors detected by the linter, the line numbers are incorrect. The sample files all have a prepended copyright notice, and as such all of the line numbers here are off by 8 lines.

So what is given as `:1s/’/“/g` should instead be `:9s/’/”/g` to give a specific example.

Categories: