[vim] Ability to perform a copy
See original GitHub issueHi, 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),
if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[') {
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.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:3
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How can I copy text to the system clipboard from Vim?
+ uses CLIPBOARD; mnemonic: CTRL PLUS C (for the common keybind). On Windows & OS X there is no difference between + and...
Read more >[vim] Ability to perform a copy · Issue #3075 - GitHub
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...
Read more >How to copy to clipboard in Vim? - Stack Overflow
Copy the text [range] of vim into the system clipboard. (Hint: use v or V to select the range first, and then type...
Read more >Copy and Paste in Vim - Tosbourn
Copy and Paste in Vim · Place the cursor on the line you want to begin cutting. · Press V to select the...
Read more >Relative copy and paste in vim - P.T.C.
Relative copy and paste in vim · The colon ( : ) means that one is entering command-line mode. · The minus sign...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can’t even copy at all. I have to disable Vim mode, copy with CTRL-C and then enable vim mode again.
"
register. Not possible to paste in other programs.+
or*
registers as they are not implemented.This is from using GraphQL Playground, which is using CodeMirror inside an Electron app, on Linux.
IMO yanking to
+
should perform a normal copy to the system clipboard, no matter what people think about the Ctrl-C situation. That could be a first step.That sounds like a very reasonable suggestion.