{"id":28401591,"url":"https://github.com/seletskiy/urxvt-vim-insert","last_synced_at":"2026-04-02T18:38:22.519Z","repository":{"id":26481418,"uuid":"29933357","full_name":"seletskiy/urxvt-vim-insert","owner":"seletskiy","description":"Make Shift-Insert work as expected in vim and shell","archived":false,"fork":false,"pushed_at":"2019-01-22T12:49:28.000Z","size":9,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-26T13:27:32.196Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seletskiy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-27T20:26:11.000Z","updated_at":"2023-12-22T12:38:21.000Z","dependencies_parsed_at":"2022-07-24T19:32:42.752Z","dependency_job_id":null,"html_url":"https://github.com/seletskiy/urxvt-vim-insert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/seletskiy/urxvt-vim-insert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Furxvt-vim-insert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Furxvt-vim-insert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Furxvt-vim-insert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Furxvt-vim-insert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seletskiy","download_url":"https://codeload.github.com/seletskiy/urxvt-vim-insert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Furxvt-vim-insert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31313080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"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":[],"created_at":"2025-06-01T13:01:45.569Z","updated_at":"2026-04-02T18:38:22.484Z","avatar_url":"https://github.com/seletskiy.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"Try to insert following text into your fully configured vim using `Shift-Insert`:\n\n```\n{\n    {\n        {\n            # madness!\n        }\n    }\n}\n```\n\nThen, compare with following gif.\n\n![gif](https://cloud.githubusercontent.com/assets/674812/5927093/15b527c6-a692-11e4-85c1-fbe4a49c4ebc.gif)\n\n\nYou can use Shift+Insert now\n============================\n\nHow many times you do following sequence in vim?\n\n```\n\u003cC-O\u003e\"*p\n```\n\nOr, if you smart one, this one?\n\n```\n\u003cC-R\u003e*\n```\n\nHowever, remote vim leaves you no choice.\n\n```\n:set paste\n\u003cS-Insert\u003e\n:set nopaste\n```\n\nurxvt-vim-insert into the rescue\n================================\n\nJust install this urxvt perl plugin, restart urxvt and all following\nShift-Inserts will paste text as it expected to be done in XXI century.\n\nIt will also work onto remote server vim. Waow.\n\nWhat's difference with \"bracketed paste?\"\n=========================================\n\n\"Bracketed paste\" requires plugin for vim and intended for pasting in vim only.\n\nurxvt-vim-insert is a plugin for terminal and redirects any paste to the new\nvim session, which can be used for **the remote sessions** as well. E.g.,\nyou can safely paste multiline text directly into remote unconfigured vim and\nit will work nice.\n\nurxvt-vim-insert can be used for pasting multiline text in local or remote\nshell.\n\nurxvt-vim-insert requires no vim/shell configuration whatsoever.\n\nHow about pasting multiline text directly into the shell?\n=========================================================\n\nSeen this site?\n\nhttp://thejh.net/misc/website-terminal-copy-paste\n\nYour browser will happily copy any hidden text into clipboard, and guess what\nhappens if you paste some hidden text that contains `rm -rf /usr/` into terminal\non the production server? :peach:\n\nHopefully, there is a solution.\n\n## :tada: TADA! :tada:\n![tada](https://cloud.githubusercontent.com/assets/674812/8426710/6d059906-1f01-11e5-8000-ba3a470630c1.gif)\n\nAlso, you need to specify program, that will be used to edit clipboard and send\nresult back.\n\nThis command is specified via `URxvt.safe-paste.command` param. See more in the\nnext section.\n\nFor example, I'm using setup with urxvt+tmux+vim, so my safe-paste command is:\n\n```\nURxvt.safe-paste.command: vim-safe-paste\n```\n\n`vim-safe-paste`:\n\n```sh\ntmux_pid=$(pgrep -P$1 tmux)\nsession_name=$(grep -zFxA1 -- '-s' \u003c /proc/$tmux_pid/cmdline | cut -b3-)\n\ntmux neww -t $session_name \"$(cat \u003c\u003cEOF\n    $EDITOR $2;\n    tmux loadb $2 \\; pasteb -t $session_name:-1 ;\n    rm $2 ;\nEOF\n)\"\n```\n\nLittle bit complicated (due stupid tmux API). When I will press `Shift+Insert`\nto paste something not into vim and clipboard contains more than one line, it\nwill popup new vim instance with clipboard contents, so I can edit it before\npasting.\n\nResult of using that simple script can be seen on the gif above.\n\n### URxvt.safe-paste.command\n\nThis parameter is mandatory and should point on the executable, that will be\nlaunched by urxvt **synchronously**, so it should fork to not to hang your\nterminal.\n\nThat executable will get two parameters:\n\n* urxvt PID for the first parameter (`$1`).\n* temporary file name with current clipboard contents as it's second parameter\n  (`$2`). This file should be removed by executable when editing is complete.\n\nInstallation\n============\n\nUnder archlinux, just install package from\n[AUR](https://aur.archlinux.org/packages/urxvt-vim-insert/).\n\nUnder any other distro, just copy [vim-insert](vim-insert) into rxvt-unicode\nextensions directory.\n\nThen, add `vim-insert` at the end of the `URxvt.perl-ext-common` list:\n\n``` URxvt.perl-ext-common: ...,vim-insert ```\n\n\nIntegration\n===========\n\nThis plugin plays nice with other things:\n\n* [marvex](https://github.com/reconquest/marvex), which is a terminal\n  bookkeeper for tile window manager called i3.\n\n* [mcabber-external-editor](https://github.com/kovetskiy/mcabber-external-editor),\n  which is a missing feature of editing multiline messages in mcabber.\n\n  `safe-paste.command` script, located in the `example/` directory is designed\n  to work with `marvex` and `mcabber-external-editor`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseletskiy%2Furxvt-vim-insert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseletskiy%2Furxvt-vim-insert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseletskiy%2Furxvt-vim-insert/lists"}