-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add OSC52 plugin for clipboard support #18575
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
base: master
Are you sure you want to change the base?
Conversation
Could you consider making it optional? With location in |
Yes I planned on doing that, I'll change it later |
43862cf
to
4b98bdb
Compare
Could anyone test in MacOS? I have added documentation on how to use |
4b98bdb
to
af1c7ce
Compare
af1c7ce
to
63bb682
Compare
I think this is ready. I didn't add tests because this plugin is very simple anyways + I'm not sure how to implement them |
I tested on my MacBooks (13.7.8 and 26.0.1) and and found that it works for Ghostty 1.2.2 and kitty 0.43.1 but not the stock Terminal app. (maybe the Terminal app doesn't support OSC52 ? ) In all cases, ommiting Ghostty prints The following is for my test on Terminal app but the same steps were performed for Ghostty and kitty.
This will print
This doesn't print anything when launching vim.
|
ec52fc8
to
0315858
Compare
0315858
to
0f0c30f
Compare
That is likely from Vim trying to detect if the terminal supports OSC 52, I've made it now that is prints a message while waiting for a response, and clears it when it is received. Although some terminals don't support responding to the escape sequence that Vim sends, so Vim just hangs until you press Ctrl-c, don't think there is any way to avoid that.
Can you elaborate on this? The plugin should match the '52' in those responses and enable the osc52 functionality. Or is it just printing characters to the screen? If so can you try the latest commit?
It looks like the default Terminal does not support OSC52 since the DA1 response (to detect OSC52 functionality) is `^[[?1;2c. Could you try iTerm? It looks like it supports OSC 52. Thanks. |
I did a git pull off the osc52_plugin, recompiled and discovered a few things. If
By that, I mean:
that's right: the Waiting message follows directly after the initial startup message So, imo, the updated commits made things even worse. Previously, the chars were displayed at step3 but after I hit ENTER, it let me use vim without step 6. I also tested iTerm2, v3.6.4. If I followed the instructions to enable clipboard access, I can copy content to clipboard but cannot paste content from clipboard. I'm not familar with iTerm2 so maybe I didn't figure out a setting somewhere to enable paste. |
I gave it a try with Alacritty under Linux and both copy and paste are working fine. Just a small nitpicks: I'm also seeing |
I experience the same issues. However, if I manually run One more thing. When pasting a clipboard that has no newlines, it seems a newline is inserted at the end. |
I currently am able to test on Windows 11 and Linux, would be nice to have some MacOS testers (using iTerm?)