-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
No ability to copy/paste in code editor #7388
Comments
This works for me. Can you go through the diagnosis guidelines to narrow down the issue? https://jupyterlab.readthedocs.io/en/stable/getting_started/issue.html |
This seems to be related to the key map editor. Ctrl-c/ctrl-y does not wok in vim mode, which I don't disagree with. Still, there is an issue. Clearer directions to reproduce:
Aside from this bug, I think it would be good to have copy/paste as explicit menu options, similar to browsers and microsoft office. I think it would be nice to have this in the context and edit menus. What do you think? |
From your reproduction steps, it sounds like VIM mode is not using the system clipboard? In other words, it may have less to do with notebooks and JupyterLab, and more to do with the CodeMirror VIM mode. Does copying and pasting from the system clipboard work in either the notebook or VIM? As for menu options - completely agree if it is possible. There are browser restrictions about copy/paste being invoked programmatically. It would be great if someone could look into it and answer definitively, as you're not the first person to suggest a copy/paste item in the menu. Note that you can shift-right click to get the browser context menu, which usually does have copy/paste. |
(and don't forget you can use the browser's actual menu to copy/paste as well) |
Yes for notebook, no from vim. I think this discrepancy is because vim mode doesn't work the same in notebook cells without something like https://github.com/jwkvam/jupyterlab-vim. So, this sounds like a code mirror VIM issue.
A menu should be possible. Copy/paste will work so long as there is called from a short running, user-generated event handler (ref). |
Yes, I imagine so. Devil's in the details, as they say, especially with browsers, so it would be great if someone could investigate with the actual code. |
Crtl-C@jasongrout are you using a mac when finding that you can copy-paste using the keyboard? It turns out that The reason that if (!IS_MAC) {
extraKeys['Ctrl-C'] = false;
} Maybe a setting could be added that allows toggling how yanking to
|
Description
When editing a file
foo.py
, I cannot copy or paste (either via a context menu or ctrl-c/ctrl-v).Reproduce
Expected behavior
Copy/paste works similar to how it does in notebook
Context
The text was updated successfully, but these errors were encountered: