Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we use osc52 to paste from clipboard as well? #1

Closed
mikekaminsky opened this issue Mar 17, 2020 · 3 comments
Closed

Can we use osc52 to paste from clipboard as well? #1

mikekaminsky opened this issue Mar 17, 2020 · 3 comments

Comments

@mikekaminsky
Copy link

Apologies if this is a very dumb question, I'm only just now starting to get my feet wet with this. Also, thanks for making this plugin -- it works great and solves a big painpoint I had.

Is it possible to use this technique to paste as well? I'd like to be able to have <Leader>p paste from my local system clipboard the same way that <Leader>y copies to my system clipboard. E.g., making this work:

vnoremap <Leader>y "+y <bar> :call SendViaOSC52(getreg('"'))<CR>
nnoremap <Leader>p "+p

If this is possible and you can point me in the right direction, I'd be happy to try to get it working.

@thiagowfx
Copy link
Contributor

Depending on which terminal you use, Ctrl + Shift + V may be used to paste.

@fcpg
Copy link
Owner

fcpg commented Jul 6, 2020

Some terminals implement fetching the system clipboard content via the OSC 52 with 0;? as content (instead of 0;base64-encoded-content, but it does not seem to be widely supported, from my quick tests. If I get it to work on mintty, I'll implement it and push an update.

@fcpg
Copy link
Owner

fcpg commented Jul 7, 2020

Seems like mintty deliberately did not implement it, for security reasons. Given that the system clipboard should already be available via some other key sequence (Ctrl+Shift+V as @thiagowfx said, or Shift+Insert), I'll just close this issue.

@fcpg fcpg closed this as completed Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants