O'Reilly logo

Mastering Vim by Ruslan Osipov

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

ack

On Linux, you can use Vim in conjunction with ack to search through code bases. ack is the spiritual successor of grep, and is focused on working with code. Install it using your favorite package manager; here's an example of using apt-get:

$ sudo apt-get install ack-grep
Visit https://beyondgrep.com/install to learn more about ack and for installation instructions.

For example, you can now use ack from the command line to search for all Python files recursively (starting in the current directory) containing the word Animal:

$ ack --python Animal

The preceding code will produce output similar to grep:

Vim has a plugin that integrates ...

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