CHAPTER 11

image

Search and Replace

One of the cornerstones of a solid text editor is the ability to find files and content and to replace the latter with new content. Many editors provide a GUI abstraction on top of underlying code that implements the search criteria for you. Vim doesn’t try to hide it and, instead, exposes it to you via the COMMAND-LINE mode.

Throughout this chapter, we will look at the multitude of ways you can search for content and replace it, once you find it. As we’ll see, there are many ways to “skin a cat,” and when it comes to “Search and Replace,” Vim is no exception.

Typically, I find myself (no pun intended) having to ...

Get Pro Vim now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.