« June 2008 | Main | August 2008 »

July 2008 Archives

July 24, 2008

vi - search replace with command

To search for a string, and then perform a vi command :

:g/string/command

for instance:

:%g/endofline$/join

will search for the string "endofline$" and then append the next line to any line that matches.

Vim documentation: http://vimdoc.sourceforge.net/htmldoc/

About July 2008

This page contains all entries posted to numbersix in July 2008. They are listed from oldest to newest.

June 2008 is the previous archive.

August 2008 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33