vscode-emacs icon indicating copy to clipboard operation
vscode-emacs copied to clipboard

C-y doesn't paste from Windows clipboard

Open alexeiz opened this issue 8 years ago • 6 comments

On Windows, C-y doesn't paste from the clipboard. Since C-v is taken, there is no other way to paste from the clipboard.

alexeiz avatar Jun 08 '16 14:06 alexeiz

I think it is an expected behaviour since Yank in vscode-emacs (and also other emacs) use its own clipboard buffer.

kpping avatar Jun 20 '16 05:06 kpping

@alexeiz The shortcut to paste from Windows clipboard is 'Shift+Insert' :wink:

sammy44nts avatar Jul 15 '16 15:07 sammy44nts

I don't like the separation either. Can't we merge with the system clipboard?

artagnon avatar Aug 30 '16 19:08 artagnon

@artagnon If you really want to get rid of the "Kill ring": Use this command > shorcut and add the following lines to the array in keybindings.json file.

{
  "key": "alt+w",
  "command": "editor.action.clipboardCopyAction",
  "when": "editorTextFocus"
},{
  "key": "ctrl+w",
  "command": "editor.action.clipboardCutAction",
  "when": "editorTextFocus"
},{
  "key": "ctrl+y",
  "command": "editor.action.clipboardPasteAction",
  "when": "editorTextFocus"
}

This should do the trick. However, I really don't understand the point of using a plugin to get VS Code to behave like emacs and not using the "Kill ring". 'Ctrl+X' and 'Ctrl+V' are respectively 'Shift+Del' and 'Shift+Insert' which are already the same keybindings on Windows... and 'Ctrl+C' or 'Ctrl+Insert' are the keybindings for "Copy to clipboard" action.

sammy44nts avatar Aug 31 '16 01:08 sammy44nts

I already have those overrides (Ctrl+k is an annoyance), and no: there's a better way to implement the kill-ring. Simply write to both the system clipboard and a private clipboard. When Alt+y is invoked, open a QuickPick showing the contents of the kill ring that I can fuzzy match against (just like anything else).

artagnon avatar Aug 31 '16 02:08 artagnon

The fuzzy paste could be of interest for some people so you should definitely make an extension on your own with it. And pull request it to @hiro-sun if you want. In my opinion, this is way too different from emacs behavior to be an improvement of the "Kill ring".

sammy44nts avatar Aug 31 '16 06:08 sammy44nts