October 2015
Intermediate to advanced
356 pages
7h 54m
English
| Tip 5 | Find and Replace by Hand |
Vim has a :substitute command for find-and-replace tasks, but with this alternative technique, we’ll change the first occurrence by hand and then find and replace every other match one by one. The dot command will save us from labor, but we’ll meet another nifty one-key command that makes jumping between matches a snap.
In this excerpt, the word “content” appears on every line:
| | ...We're waiting for content before the site can go live... |
| | ...If you are content with this, let's go ahead with it... |
| | ...We'll launch as soon as we have the content... |
Suppose that we want to use the word “copy” (as in “copywriting”) instead of “content.” Easy enough, you might think; we can just use ...