Have there been considerations about shared buffers? Is that possible already?
I have read the most part of the manuals and did not find anything...
With the help of SwapExistsEvent, v:swapcommand and remote_expr() I managed to
have basic interaction between multiple gvim-instances.
My use case:
- multiple gvim instances to represent different parts of a project,
with a pertinent titlestring and a familiar tab-layout.
- registered buffers for a session, to easily clean foreign buffers.
- SwapExistsEvent handling to iterate over existing vim-servers and
dispatch the corresponding command. That applies to everything
quickfix and ':tag' related.
Now, I'm a very young vim-scriptor and this script is ... somewhat fragile.
And the style and design could be improved, too.
This is actually my first script that exceeds one screen-page -
my practicing ground so to speak. It is clearly just a prototype.
It currently works for me - not without frowns but it works for me - and I
have spent too much time on it already distracting me from my actual project.
I will continue to improve my vim-scripting and hopefully contribute something
more mature then.
However, I desperately needed this functionality and maybe others do, too. So
please forgive me that I kind of just ... put it here, because of the
distraction-point I made above. Maybe someone who needs it, too, finds it
improves it, generalizes it...
Advices are welcome, of course.
Or maybe see this as a xxx lines strong wishlist entry for shared buffers.
Separate bufferlist have its advantages too (more manageable, better overview)
but not having the quickfix buffer in the remote session is a major drawback
(that was the intention for the unused "Swap-Command-Context" in the script).
Obvious problems and pecularities are:
- I don't know how to prevent an already remotely edited buffer from
being added to the bufferlist
- If the remote command triggers a prompt (like ':tag'), one cannot
enter digits
- the remote acceptor function does not search the tab for the buffer
but always uses the last tab, which is some sort of rummaging tab in
each of my sessions.
- :bufdo closes the quickfix window if it is the current window while
executing MarkAllNonRegisteredBuffersToBeDeleted()
- and more...
The next answer is the script...
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---