Monday, January 25, 2010

Help with :v

Hi,
I would like to delete everything not matching to a pattern...
I usually do it this way:

:v/my pattern/d<CR>

and it works perfect to any single line pattern...

my problem is that I want to keep something like this:

ABC ...
....
....
...
And until the first empty line...

How it is possible ? I was thinking something like this:
:v/ABC\(.|\n)*^\s*$/d

but not really work.

Thanks in advice.

Br,
Peter.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment