-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
[vim] Ability to perform a copy #3075
Comments
That sounds like a very reasonable suggestion. |
Yes please. Just started using Light Table. Searched to find out how to change ctrl-c to copy while in insert mode. This was the top hit on google. |
So looking back on this, Light Table has a solution for this LightTable/LightTable#688. Does this not work for you? |
Thank you. Works for me. |
This might be relevant: https://hacks.mozilla.org/2015/09/flash-free-clipboard-for-the-web/ |
I can't even copy at all. I have to disable Vim mode, copy with CTRL-C and then enable vim mode again.
This is from using GraphQL Playground, which is using CodeMirror inside an Electron app, on Linux. IMO yanking to |
So come 2020 the situation has evolved somewhat for the better. Firefox, Edge, Chrome and Opera now all support if (['+', '*'].indexOf(args.registerName) !== -1) {
navigator.clipboard.writeText(text).catch(err => {
// This can happen if the user denies clipboard permissions:
// or if using safari
console.error('Could not copy text: ', err);
});
cm.focus()
} to the yank function. I think the two issues with this approach are:
Even though Safari isn't supported maybe this could be added because it won't negatively impact Safari users? As evidence that this works I patched this into jupyterlab's codemirror like this: https://github.com/ianhi/jupyterlab_vim-system-clipboard-support/blob/2ebc799500f9a44c7e7cb00f71a1a30112833277/src/yank.ts#L27 |
The vim code is now being maintained at https://github.com/replit/codemirror-vim/ . If this is still important, check whether there is an issue open for it there. |
Hi,
I'm trying to use the vim mode from CodeMirror and there is one thing bordering me. I'm aware that the command Ctrl-C is used in vim to return to the normal mode, but in a GUI based text editor, Ctrl-C would pretty much always be the copy. I know that most people using vim would want to keep the Ctrl-C to change mode, but I think it could be an option.
In the code the Ctrl-C is hardcoded (https://github.com/codemirror/CodeMirror/blob/f1692af532b78b7aeacb9dfc1962e2443866f65b/keymap/vim.js),
Wouldn't be nice to have an option to disable this?
What to you think guys? I would be really interested to know your opinion.
The text was updated successfully, but these errors were encountered: