A recent PR feat(clipboard): add OSC 52 clipboard support #25872 allows Neovim v0.10 to support both copy and paste operations using OSC52.
It's trivial to implement the copy operation with Vimscript but it's quite difficult to implement the paste operation without some changes.
If I understand it correctly, Neovim basically repurposes the TermReponse event to capture the content sent from the terminal after the right paste escape chars are written to the terminal.
Is your feature request about something that is currently impossible or hard to do? Please describe the problem.
It's difficult to use the existing VIM features to support the OSC52 paste operation, esp. the part where the content from the terminal can't be easily captured and made available.
Describe the solution you'd like
Implement OSC52 copy and paste natively and provide g: options for configuration (e.g. on/off)
Describe alternatives you've considered
Use a 3rd party program, such as this one (https://github.com/theimpostor/osc) to help capture the pasted content via a call to system().
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Note: Nvim's TermResponse
event is completely different from Vim's TermResponse
and TermResponseAll
.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
For completeness, this is the PR where Neovim repurposed TermReponse
.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
This migh be a big complicated, because typically terminal escapes can occur later, even withing other events that need to be handled. I have no idea how complex setting this up.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
maybe add a new code to handle osc52 paste in TermResponseAll
?
h: TermResponseAll
already warns
Note that this event may be triggered halfway
executing another event, especially if file I/O,
a shell command or anything else that takes time
is involved.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.