Tuesday, August 7, 2012

Re: Activating gVim from the command line (cont)

On Aug 8, 3:34 am, Ben Fritz <fritzophre...@gmail.com> wrote:
> On Tuesday, August 7, 2012 10:49:27 AM UTC-5, Christian Brabandt wrote:
> > Hi Ben!
>
> > On Di, 07 Aug 2012, Ben Fritz wrote:
>
> > > From previous discussion, he claims to want the first "blobfish" on or
>
> > > after line 51. While this could be done with the line number match, it
>
> > > seemed clearer to use a range.
>
> > > But maybe try the line number match anyway, the pattern should be like
>
> > > '\%51l\_.\{-}\zsblobfish' (untested), which should match any number of
>
> > > characters including line endings on or after line 51, as few as
>
> > > possible until "blobfish" is encountered, and set the start of match
>
> > > to the start of "blobfish".
>
> > It is even easier using the '\%>l' item:
>
> > \%>51lblobfish
>
> > this finds the first blobfish after line 51.
>
> Forgot about that one, thanks.- Hide quoted text -
>
> - Show quoted text -

Thanks guys, but none of these seemed to work:
Ben's first suggestion of '\%51l\_.\{-}\zsblobfish' was mistaken for a
file path:
"\TEMP\tmp\'\%51l\_\{-}\zsblobfish'" [New file]

As for omitting the '+' before the line number, that was also mistaken
for a file path:
<lobfish\;call search('blobfish','c')" [New file]

Christian's '\%>51lblobfish' merely opened the file without attempting
a search, which is a pity as it would have been an elegant solution.

It could be that you are providing only a fragment and I am stuffing
up somewhere else on the line. Maybe if you could furnish the full
line it might help. Sorry to prevail so much on your time.
It really isn't too important now as I have a working solution, albeit
a rather inelegant one:
gvim --servername HgVim --remote-silent "+51;/blobfish/;call
search('blobfish','c')" fish.cpp

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