You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. neovim/neovim#25868
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)
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.
maybe add a new code to handle osc52 paste in TermResponseAll?
:help 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.
Activity
zeertzjq commentedon Jun 13, 2024
Note: Nvim's
TermResponseevent is completely different from Vim'sTermResponseandTermResponseAll.peterwu commentedon Jun 13, 2024
For completeness, this is the PR where Neovim repurposed
TermReponse.neovim/neovim#25868
chrisbra commentedon Jun 15, 2024
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.
peterwu commentedon Jun 15, 2024
maybe add a new code to handle osc52 paste in
TermResponseAll?:help TermResponseAllalready warnspatch 9.1.1703: Cannot react to terminal OSC responses
andreihh commentedon Aug 31, 2025
It's great to see this fixed, I'm looking forward to not have to rely on https://github.com/ojroques/vim-oscyank :). I looked at the commit that fixed this, and I'm not sure how I can enable the OSC52 clipboard in my
vimrc?peterwu commentedon Sep 5, 2025
Not perfect but here is what I have in my vimrc. HTH.
patch 9.1.1703: Cannot react to terminal OSC responses
patch 9.1.1984: terminal OSC52 support can be improved
vim-patch:9.1.1984: terminal OSC52 support can be improved
vim-patch:9.1.1984: terminal OSC52 support can be improved (#37543)
vim-patch:9.1.1984: terminal OSC52 support can be improved (neovim#37543