Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yank back killed text ctrl+y stopped working #72630

Open
rkdmen opened this issue Apr 20, 2019 · 10 comments
Open

Yank back killed text ctrl+y stopped working #72630

rkdmen opened this issue Apr 20, 2019 · 10 comments
Labels
editor-commands Editor text manipulation commands feature-request Request for new features or functionality macos Issues with VS Code on MAC/OS X
Milestone

Comments

@rkdmen
Copy link

rkdmen commented Apr 20, 2019

  • VSCode Version: 1.33.1 ( Recent )
  • OS Version: Mac 10.14.4

Steps to Reproduce:

  1. ctrl+k to kill text.
  2. ctrl+y to paste the kill text does not work.

Does this issue occur when all extensions are disabled?: Yes

Works on all other program except vscode.

@vscodebot vscodebot bot added the editor-find Editor find operations label Apr 20, 2019
@rebornix
Copy link
Member

rebornix commented Aug 3, 2019

We didn't bind ctrl+y to paste content, please help confirm if it's contributed by an extension?

@rebornix rebornix added the info-needed Issue requires more information from poster label Aug 3, 2019
@rkdmen
Copy link
Author

rkdmen commented Aug 5, 2019

@rebornix Currently VSCode is only app on my mac that does not support ctrl+y. Something must’ve over ride that. Its should work natively without binding.

@rebornix rebornix added editor-commands Editor text manipulation commands feature-request Request for new features or functionality macos Issues with VS Code on MAC/OS X and removed editor-find Editor find operations info-needed Issue requires more information from poster labels Aug 5, 2019
@rebornix rebornix removed their assignment Aug 5, 2019
@rebornix rebornix added this to the Backlog milestone Aug 5, 2019
@yjkogan
Copy link

yjkogan commented Aug 6, 2019

I think this may have broken in Mojave specifically. I recently went from a work computer on Sierra to a personal computer that's running Mojave and noticed this. I'm just guessing at the moment though

@rkdmen
Copy link
Author

rkdmen commented Aug 6, 2019

@octref @rebornix It would be really nice to get yank back working. It's the only app in mac that doesn't work.

@partap
Copy link

partap commented Sep 30, 2020

It's not the same as paste (cmd+v)...
ctrl+k, ctrl+y uses a different buffer than the clipboard.

Although, I suppose that's not a dealbreaker... As a workaround I could map ctrl+k to shift+cmd+right_arrow, cut, and then map ctrl+y to paste, just to help my poor muscle memory.

But it seems that vscode is actively overriding the system's ctrl+y behavior somehow, and it would be nice to be able to just "unmap" the key and make it work normally.

@lastobelus
Copy link

lastobelus commented Mar 23, 2021

@rebornix I don't believe this is specific to VSCode, in other Electron apps the behaviour is the same — kill (^k) works, but yank (^y) does not. (e.g.: Obsidian, Slack)

@rkdmen
Copy link
Author

rkdmen commented Apr 3, 2021

@rebornix I don't believe this is specific to VSCode, in other Electron apps the behaviour is the same — kill (^k) works, but yank (^y) does not. (e.g.: Obsidian, Slack)

Spotify is Electron app, but it works (kill & yank)

@arobertn
Copy link

arobertn commented Sep 21, 2021

I'm not really sure if Electron on the Mac is using a standard Macos text widget that has these bindings implemented or not. However if you go to Code | Preferences | Keyboard Shortcuts and then search for Ctrl-k, it is in fact bound to "Delete All Right". If you remove that, Ctrl-k then does nothing in the editor.

So what is likely needed is a solution like @partap proposed, but to be delivered as part of the defaults. I am OK whether it uses the same clipboard (like Emacs does), or a separate one (like MacOS elsewhere does).

(In the meantime, I obtained the desired effect manually by installing ctf0's "macros" extension, adding to settings:

    "macros.list": {
        "emacsKill": [
            "cursorLineEndSelect",
            "execCut"
        ],
        "emacsYank": [
            "execPaste"
        ]

and then binding ctrl-k and ctrl-y appropriately.)

@notpeter
Copy link

I found an extension which does this and nothing more: wdawson/vscode-bkr.

@partap
Copy link

partap commented Nov 18, 2022

@notpeter Yay! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-commands Editor text manipulation commands feature-request Request for new features or functionality macos Issues with VS Code on MAC/OS X
Projects
None yet
Development

No branches or pull requests

7 participants