{"id":13419949,"url":"https://github.com/ojroques/vim-oscyank","last_synced_at":"2026-01-28T10:31:55.310Z","repository":{"id":39920828,"uuid":"316280687","full_name":"ojroques/vim-oscyank","owner":"ojroques","description":"A Vim plugin to copy text through SSH with OSC52","archived":false,"fork":false,"pushed_at":"2025-04-11T19:06:25.000Z","size":69,"stargazers_count":687,"open_issues_count":4,"forks_count":43,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-10-10T10:27:19.167Z","etag":null,"topics":["osc52","vim-osc52","vim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ojroques.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-26T16:13:40.000Z","updated_at":"2025-10-02T19:49:31.000Z","dependencies_parsed_at":"2023-12-07T10:29:10.177Z","dependency_job_id":"b3a29b99-2d54-4482-acfe-64b9393b97ac","html_url":"https://github.com/ojroques/vim-oscyank","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ojroques/vim-oscyank","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ojroques%2Fvim-oscyank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ojroques%2Fvim-oscyank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ojroques%2Fvim-oscyank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ojroques%2Fvim-oscyank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ojroques","download_url":"https://codeload.github.com/ojroques/vim-oscyank/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ojroques%2Fvim-oscyank/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28844014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T07:39:25.367Z","status":"ssl_error","status_checked_at":"2026-01-28T07:39:24.487Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["osc52","vim-osc52","vim-plugin"],"created_at":"2024-07-30T22:01:23.314Z","updated_at":"2026-01-28T10:31:55.293Z","avatar_url":"https://github.com/ojroques.png","language":"Vim Script","readme":"# vim-oscyank\n\nA Vim plugin to copy text to the system clipboard using the\n[ANSI OSC52](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands)\nsequence.\n\nThe plugin wraps a piece of text inside an OSC52 sequence and writes it to Vim's stderr. When your\nterminal detects the OSC52 sequence, it will copy the text into the system clipboard.\n\nThis is totally location-independent, you can copy text from anywhere including from remote SSH\nsessions. The only requirement is that the terminal must support the sequence. You can find at the\nend a non-exhaustive list of the state of OSC52 integration in popular terminal emulators.\n\n## Installation\nWith [vim-plug](https://github.com/junegunn/vim-plug) for instance:\n```vim\nPlug 'ojroques/vim-oscyank', {'branch': 'main'}\n```\n\n**If you are using Tmux**, run these steps first:\n[Enabling OSC52 in Tmux](https://github.com/tmux/tmux/wiki/Clipboard#quick-summary). Then make sure\n`set-clipboard` is set to `on` in your Tmux config:\n```\nset -s set-clipboard on\n````\nSee `:h oscyank-tmux` for more details.\n\n## Usage\nAdd this to your Vim config:\n```vim\nnmap \u003cleader\u003ec \u003cPlug\u003eOSCYankOperator\nnmap \u003cleader\u003ecc \u003cleader\u003ec_\nvmap \u003cleader\u003ec \u003cPlug\u003eOSCYankVisual\n```\n\nWith these mappings:\n* In normal mode, \u003ckbd\u003e\\\u003cleader\\\u003ec\u003c/kbd\u003e is an operator that will copy the given text to the\n  clipboard.\n* In normal mode, \u003ckbd\u003e\\\u003cleader\\\u003ecc\u003c/kbd\u003e will copy the current line.\n* In visual mode, \u003ckbd\u003e\\\u003cleader\\\u003ec\u003c/kbd\u003e will copy the current selection.\n\nNeovim 0.10+ natively supports OSC52 since [this PR](https://github.com/neovim/neovim/pull/25872)\nwas merged. See `:h clipboard-osc52` in Neovim. If you still wish to use this plugin, add this to\nyour Neovim config:\n```lua\nvim.keymap.set('n', '\u003cleader\u003ec', '\u003cPlug\u003eOSCYankOperator')\nvim.keymap.set('n', '\u003cleader\u003ecc', '\u003cleader\u003ec_', {remap = true})\nvim.keymap.set('v', '\u003cleader\u003ec', '\u003cPlug\u003eOSCYankVisual')\n```\n\n## Configuration\nThe available options with their default values are:\n```vim\nlet g:oscyank_max_length = 0  \" maximum length of a selection, 0 for unlimited length\nlet g:oscyank_silent     = 0  \" disable message on successful copy\nlet g:oscyank_trim       = 0  \" trim surrounding whitespaces before copy\nlet g:oscyank_osc52      = \"\\x1b]52;c;%s\\x07\"  \" the OSC52 format string to use\n```\n\nSee `:h oscyank-config` for more details.\n\n## Advanced Usage\nThe following commands are also available:\n* `:OSCYank(text)`: copy text `text`\n* `:OSCYankRegister(register)`: copy text from register `register`\n\nFor instance, to automatically copy text that was yanked into the unnamed register (`\"`) as well as\n`+` and `\"` when the clipboard isn't working:\n\n```vim\nif (!has('nvim') \u0026\u0026 !has('clipboard_working'))\n    \" In the event that the clipboard isn't working, it's quite likely that\n    \" the + and * registers will not be distinct from the unnamed register. In\n    \" this case, a:event.regname will always be '' (empty string). However, it\n    \" can be the case that `has('clipboard_working')` is false, yet `+` is\n    \" still distinct, so we want to check them all.\n    let s:VimOSCYankPostRegisters = ['', '+', '*']\n    \" copy text to clipboard on both (y)ank and (d)elete\n    let s:VimOSCYankOperators = ['y', 'd']\n    function! s:VimOSCYankPostCallback(event)\n        if index(s:VimOSCYankPostRegisters, a:event.regname) != -1\n            \\ \u0026\u0026 index(s:VimOSCYankOperators, a:event.operator) != -1\n            call OSCYankRegister(a:event.regname)\n        endif\n    endfunction\n    augroup VimOSCYankPost\n        autocmd!\n        autocmd TextYankPost * call s:VimOSCYankPostCallback(v:event)\n    augroup END\nendif\n```\n\n## Terminal Support\n| Terminal | OSC52 support |\n|----------|:-------------:|\n| [alacritty](https://github.com/alacritty/alacritty) | **yes** |\n| [contour](https://github.com/contour-terminal/contour) | **yes** |\n| [far2l](https://github.com/elfmz/far2l) | **yes** |\n| [foot](https://codeberg.org/dnkl/foot) | **yes** |\n| [gnome terminal](https://github.com/GNOME/gnome-terminal) (and other VTE-based terminals) | [not yet](https://gitlab.gnome.org/GNOME/vte/-/issues/2495) |\n| [hterm](https://chromium.googlesource.com/apps/libapps/+/master/README.md) | [**yes**](https://chromium.googlesource.com/apps/libapps/+/master/nassh/doc/FAQ.md#Is-OSC-52-aka-clipboard-operations_supported) |\n| [iterm2](https://iterm2.com/) | **yes** |\n| [kitty](https://github.com/kovidgoyal/kitty) | **yes** |\n| [konsole](https://konsole.kde.org/) | **yes** |\n| [qterminal](https://github.com/lxqt/qterminal#readme) | [not yet](https://github.com/lxqt/qterminal/issues/839)\n| [rxvt](http://rxvt.sourceforge.net/) | **yes** |\n| [st](https://st.suckless.org/) | **yes** (but needs to be enabled, see [here](https://git.suckless.org/st/commit/a2a704492b9f4d2408d180f7aeeacf4c789a1d67.html)) |\n| [terminal.app](https://en.wikipedia.org/wiki/Terminal_(macOS)) | no, but see [workaround](https://github.com/roy2220/osc52pty) |\n| [tmux](https://github.com/tmux/tmux) | **yes** |\n| [urxvt](http://software.schmorp.de/pkg/rxvt-unicode.html) | **yes** (with a script, see [here](https://github.com/ojroques/vim-oscyank/issues/4)) |\n| [wezterm](https://github.com/wez/wezterm) | [**yes**](https://wezfurlong.org/wezterm/escape-sequences.html#operating-system-command-sequences) |\n| [windows terminal](https://github.com/microsoft/terminal) | **yes** |\n| [xterm.js](https://xtermjs.org/) (Hyper terminal) | [not yet](https://github.com/xtermjs/xterm.js/issues/3260) |\n| [zellij](https://github.com/zellij-org/zellij/) | **yes** |\n\nFeel free to add terminals to this list by submitting a pull request.\n\nYou can also check\n[can-i-use-terminal.github.io](https://can-i-use-terminal.github.io/features/osc52copy.html) to see\nif your terminal supports OSC52.\n","funding_links":[],"categories":["Vim Script","HarmonyOS"],"sub_categories":["Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fojroques%2Fvim-oscyank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fojroques%2Fvim-oscyank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fojroques%2Fvim-oscyank/lists"}