Monday, March 5, 2012

Re: Exclude pattern in global command

On 03/05/12 05:42, Jostein Berntsen wrote:
> I would like to search all lines with "-->" in a file, but exclude all
> these lines with "(X)" in them. Is this possible to do with the global
> command?

/\%(.*-->.*\&^\%(\%((X)\)\@!.\)*$\)

Using Dr. Chip's LogiPat.vim[1] makes generating these
monstrosities pretty straightforward.

> Is it also possible to give a command to global that makes it go to
> the end of the output list?

Just as in a buffer "G" seems to take me to the last line of output.

-tim

[1]
http://www.vim.org/scripts/script.php?script_id=1290


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment