Vim Scoops / Lessons / E486: Pattern not found

E486: Pattern not found

E486 means your search or :s command found no match in the file. The usual culprit is case: Vim's search is case sensitive by default, so /mint won't find MINT.

The keys

KeysWhat they do
/mint\cSearch ignoring case, just this once
:set ignorecase smartcaseIgnore case unless you type a capital
/1\.5Escape special characters like .
:%s/old/new/geThe e flag skips E486 when nothing matches

The pattern after / is a regular expression. Characters like ., *, [ and ~ mean something special, so a pattern can fail to match text that looks identical.

Searches wrap around the end of the file, so if there's no match anywhere, E486 really does mean the text isn't there.

Related

Want all of Vim, in order? Vim Scoops is a free game that starts at h j k l and builds up to macros.

Play the full game