Monday, March 5, 2012

Re: Exclude pattern in global command

On Mar 5, 6:10 am, Jostein Berntsen <jber...@broadpark.no> wrote:
> On 05.03.12,05:57, Tim Chase wrote:
>
> > 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.
>
> Thanks, this seems to work for search, but what I would like to dois to get the
> output to the global quicklist.
>

Then, you ought to have asked for getting it in quickfix. What you
said was "search", so we gave you search.

You can use the same pattern with the :vimgrep command to get the
results in the quickfix list. See :help :vimgrep or
http://vim.wikia.com/wiki/Find_in_files_within_Vim for details on
using the command.

> > >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.
>
> In the global quicklist "G" seems to exit the list.
>

This should not happen. Please give an exact sequence of commands you
enter to bring up the quickfix list and make G exit the quickfix list.
Then try it again with (g)vim -N -u NONE -i NONE; I suspect you have a
plugin or mapping interfering here.

--
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: