Today I Learned
How to search and replace within a range in vim
Posted on January 3, 2018

A quick “search and replace in vim” google search will likely result in vim command looking something like this:


While useful, you may have a big file and want to restrict where you find and replace. The % operator can be omitted to search a single line, or be replaced with a range of lines, like so:

" Singe line

" Range