{"action":"created","issue":{"url":"https://api.github.com/repos/codemirror/CodeMirror/issues/3293","labels_url":"https://api.github.com/repos/codemirror/CodeMirror/issues/3293/labels{/name}","comments_url":"https://api.github.com/repos/codemirror/CodeMirror/issues/3293/comments","events_url":"https://api.github.com/repos/codemirror/CodeMirror/issues/3293/events","html_url":"https://github.com/codemirror/CodeMirror/issues/3293","id":82537349,"number":3293,"title":"[vim] Add support for the star register (system clipboard copy+paste)","user":{"login":"kevinushey","id":1976582,"avatar_url":"https://avatars.githubusercontent.com/u/1976582?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinushey","html_url":"https://github.com/kevinushey","followers_url":"https://api.github.com/users/kevinushey/followers","following_url":"https://api.github.com/users/kevinushey/following{/other_user}","gists_url":"https://api.github.com/users/kevinushey/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinushey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinushey/subscriptions","organizations_url":"https://api.github.com/users/kevinushey/orgs","repos_url":"https://api.github.com/users/kevinushey/repos","events_url":"https://api.github.com/users/kevinushey/events{/privacy}","received_events_url":"https://api.github.com/users/kevinushey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-29T18:36:14Z","updated_at":"2015-06-01T08:47:44Z","closed_at":null,"body":"I'm not sure what the best way of wiring this in would be, but here's a proposal:\r\n\r\n1. Create a `SystemRegister` function, and have its prototype 'inherit' from `Register`,\r\n2. Override the `setText`, `pushText` and `toString` methods to instead access the system clipboard.\r\n\r\nBecause there's a lot of messiness in accessing the clipboard, there could be placeholder functions like `$readClipboard` and `$writeClipboard` that users of `vim.js` could then implement themselves (pushing the onus of reading/writing to the clipboard to the user), which would then hopefully 'just work' in the context of the remaining code.\r\n\r\nAny thoughts on the feasibility of this? I'd be happy to try and prototype an implementation if you think this is the right way to go."},"comment":{"url":"https://api.github.com/repos/codemirror/CodeMirror/issues/comments/107370406","html_url":"https://github.com/codemirror/CodeMirror/issues/3293#issuecomment-107370406","issue_url":"https://api.github.com/repos/codemirror/CodeMirror/issues/3293","id":107370406,"user":{"login":"marijnh","id":144427,"avatar_url":"https://avatars.githubusercontent.com/u/144427?v=3","gravatar_id":"","url":"https://api.github.com/users/marijnh","html_url":"https://github.com/marijnh","followers_url":"https://api.github.com/users/marijnh/followers","following_url":"https://api.github.com/users/marijnh/following{/other_user}","gists_url":"https://api.github.com/users/marijnh/gists{/gist_id}","starred_url":"https://api.github.com/users/marijnh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marijnh/subscriptions","organizations_url":"https://api.github.com/users/marijnh/orgs","repos_url":"https://api.github.com/users/marijnh/repos","events_url":"https://api.github.com/users/marijnh/events{/privacy}","received_events_url":"https://api.github.com/users/marijnh/received_events","type":"User","site_admin":false},"created_at":"2015-06-01T08:47:44Z","updated_at":"2015-06-01T08:47:44Z","body":"Note that, at the moment, there is _no_ way to get the content of the clipboard from JavaScript, and only spotty support for setting its content (outside of the context of copy/paste events), so I'm not sure this is a realistic feature."}}