Closed j-hui closed 2 years ago
I did not know about OSC but sounds very interesting and useful for my ssh remote sessions.
Supporting OSC out-of-the-box is really out of scope for this plugin unless they include it in neovim core. Because of that, its support relies on an external plugin which makes that action_callback
(although useful) not suited to be the default.
However, I would accept a PR that either:
README
+ help
Totally understand about it being out of scope; just having action_callback
gives users everything they need to make OSC yank work (like I did). The configuration isn't even that complicated.
I'll make a PR sometime soon.
Is your feature request related to a problem? Please describe. Yanking to the system clipboard only works if the Neovim instance is running on your host machine; it doesn't work if it's running inside an SSH session, for example.
Describe the solution you'd like Most popular terminal emulator seem to support the ANSI OSC52 sequence, an escape sequence that tells the terminal emulator to copy some text to the system clipboard.
Something like this is already implemented using ojroques/vim-oscyank.
It would be great if there were a gitlinker action that could do the same.
Describe alternatives you've considered
Perhaps this suggestion is simply out of the scope of this plugin (in which case this issue needn't be kept open except for reference).
In any case, the following
action_callback
makes use of vim-oscyank, and may be of interest to others:I also add the
url
to vim's unnamed register because I'm used to it being in sync with the system clipboard, but that's entirely optional.