Sunday, September 19, 2010

How to delete a line which contain matching text line using vim?

It is easy to delete all lines which have matching text at one shot.  For that you have to change the mode to command by presssing "Esc" key.Then type

:g/match text/d

thats it. All the lines which contain the "match text" will be deleted. This is tested with windows gvim.

No comments:

Post a Comment