feat(#1549): copy files between multiple vim instances#3334
Conversation
|
I am here thinking about the protocol thing, I think maybe it should be removed so that it can allow me to easily copy file from my OS explorer to nvim basically I copy the path the I we gotta build extensions for OS. |
|
Then if we remove the protocol we have no need to a new command like |
That sounds like a reasonable solution that would avoid a lot of complexity. The user will be explicitly cutting and will be aware of this behaviour. Looking great, I'll get to a review shortly. |
That would be very useful. I've had a very quick look at the XDG spec for extended clipboard handling but found nothing. Experimentation is needed. |
|
Should I remove the protocol for a while? |
If it works now, leave it. We can change it later if we want, as we don't need to worry about compatibility. |
|
It does works fine and without it would work as well even with lesser code.
If we leave the protocol won't be able to simply copy a path from wherever
and then `gp` (gp over bgy because the copy would simply be what we use the
`gy`).
But if it is fine for you that's ok. the job is done.
Would only be left on the table whether add `bgx` (with protocol) or a
`gpx|gx` (without protocol would mean paste while cutting).
…On Fri, 12 Jun 2026, 07:11 Alexander Courtis, ***@***.***> wrote:
*alex-courtis* left a comment (nvim-tree/nvim-tree.lua#3334)
<#3334 (comment)>
Should I remove the protocol for a while?
If it works now, leave it. We can change it later if we want, as we don't
need to worry about compatibility.
—
Reply to this email directly, view it on GitHub
<#3334?email_source=notifications&email_token=AY3TPBJ46RAY3GC4MQ6AFDD47OGJFA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRYG43DOMBSGU42M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4687670259>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AY3TPBIKQ3ZN7EHM65AJXWD47OGJFAVCNFSNUABFKJSXA33TNF2G64TZHMZDGOBSHAZDENRYHNEXG43VMU5TINRUGE4DCNZTHAY2C5QC>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Closes #1549
Summary
This PR introduces the feature to allow copying files between multiple vim instances plus some code small refactors to improve the codebase.
Changes
copy_absolute_pathandpasteby passingoptswithuse_protocol.bgy- copy using protocol andbgppaste using protocol (preferedbgy+bgpinstead ofbgy+gpfrom copy files between multiple vim instances #1549 because of consistency and I tell from own xp while testing)actions.clipboard.protocolcopy_basenameandcopy_absolute_pathvisual capable, reason almost ZERO for me, but I think is something users would expect to exist, mainly now that we've many visual operationsWhat Can Be Improved (My thoughts)
1 - Maybe rename
bgytobgcto be consistent withcour current copy key2 - Maybe add
bgxto allow cutting the files (which will only add a slight change into the copied text), and if we want to allow cutting should it be on copying to clipboard time or decide when pasting, e.g:bgxand thenbgp, basically I decided tocuton copying to clipboard timebgcand thenbgp(copy) orbgxp(or whatever) to mean pasteI am leaning more toward first option to match what we do in our OS already we decide cut/copy at the time we are selecting the file(s).
BTW this was a wild and exciting PR for me, the conversation under #1549 and the changes regarding visual copy/cut/delete from @v3ceban helped a lot.