On Thursday, August 2, 2012 10:16:55 PM UTC-5, His Nerdship wrote:
>
>
>
> gvim --servername HgVim --remote-silent "+51;/blobfish/;:call
>
> search('blobfish','c')" fish.cpp
>
>
>
> However it adds a new twist, albeit a trivial one. I have to
>
> decrement 1 from the line number. In the above example, if 'blobfish'
>
> is on line 52 and I specify +52 in the command, it will actually start
>
> from line 53. This is not important as I can easily code around that,
>
> even if the search expression is on line 1 (just specify '+0').
>
> If you know of a way round this it would be good but as I said, it's
>
> not a showstopper.
>
> Really appreciate the help you give to me and everyone else.
I think the problem is you're using +52 as a range, meaning "52 lines after the current line". Since when you load a file Vim starts at line 1, this means line 53.
Try using "52" instead of "+52", although I'm not quite sure why what you're doing works, because it looks to me at first glance like Vim should try to edit a file with a name equal to the command you gave rather than executing the command. I guess I need to read through the help on the --remote family again.
--
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
Tuesday, August 7, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment