O'Reilly logo

Hacking Vim 7.2 by Kim Schulz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Search and you will find

We all know the feeling of having seen the things we have misplaced somewhere, but not remembering exactly where. What we normally do in a situation like this is search for the thing we are missing.

In Vim, we can do the exact same thing. Let's split the search into three cases as follows:

  • Searches in the current file
  • Searches in multiple files
  • Searches in the help files

In the following sections, we will look at recipes that help you with the three types of search.

Search the current file

Even though your file might not be that long, it can still be a pain to find something you are looking for. Vim has several ways to help you find what you are looking for.

So, let's look at some examples.

Example 1: Find the next occurrence ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required