Am 2015-02-12 08:46, schrieb Jan Larres:
I am currently writing a plugin to handle existing swapfiles in a smart
way.
Unfortunately there is not much information about existing swapfiles
directly
available to plugins; as far as I can see only the filename is through
the
v:swapname variable. Everything else that may be relevant like the pid
of the
process that is currently using the swapfile, or whether the file has
been
modified since the last swapfile update, does not have similar
functionality
to access it.
The information is available in the output of "vim -r", but this
requires
spawing a new Vim process and parsing the output manually. It would be
handy
if this information were available for example with a function that
takes a
filename as an argument and returns a dictionary with all of the
relevant
information. If possible and available it could also return the
servername of
the appropriate Vim instance to help with sending commands to it.
That is not currently possible and parsing the vim -r output is what the
https://github.com/chrisbra/Recover.vim plugin does.
Best,
Christian
--
--
You received this message from the "vim_dev" 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
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.