The original post has been successfully addressed.
In my last example, I was searching for 'haddock' in fish.cpp. From
the command line I can now successfully open fish.cpp and have the
cursor sitting on a haddock.
But wait, there's more...
I will also need to open the same file, again from the command line,
but with a different search expression. Say fish.cpp is already open
with haddock as the current search string, but this time I need to
search for 'blobfish'.
According to received wisdom, I should be able to issue another
command with the --remote argument and bring up the same file but this
time with the cursor sitting on a blobfish.
gvim -c"/blobfish" +52 -c ":call search('blobfish','c')" --remote
fish.cpp
However there are 2 problems:
1) If there are currently 2 or more Vim servers running, it will issue
an error 'Swap file ".fish.cpp.swp" already exists'. This message
always comes from the vim server that does NOT contain fish.cpp. I
assume I have to force it to the server that already has fish.cpp open
(with the --server arg). But how can I tell which server it is?
2) Even if it successfully opens up the existing vim server, it
ignores the new search expression and continues to search for the
previous one. In this case it is still looking for haddock even
though I (should) have instigated a new search, for blobfish.
Again, thanks in advance.
--
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
Thursday, August 2, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment