i needed to add some text to the end of some lines scattered throughout a large file today and figured out how to do it with one little command in the vi editor 🙂
This will find all lines containing pattern and then append -new to the end of each:
:%s/\(.*pattern.*\)/\1-new/g |
interestingly, my vim tips page is the second most popular destination on my site with 9.63% of all traffic…
the most popular page (at 12.6%) is my PHP Slideshow page with my photo blog in distant 4th place at only 2.53% of the visitors to zinkwazi.com.