Sunday, October 17, 2010

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

I have already added a blog post with a tip for deleting all the matching lines for a matching patern. But this is some thing similar still it is easy after you seached for a text. ie., first search the pattern by "/" and the execute the command -
This will delete all the lines with matching patterns. Tested in linux and also in windows.

Sunday, October 3, 2010

How to find number of matches in gvim

It is a easy tip to find the number of matching for the given pattern. Just search and replace it with any thing and see the success message given by vim. It will say "42 substitutions on 21 lines". And now undo changes. Thats it.