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

Enable Ctrl+C copy selection while in vim-mode #688

Closed
clojens opened this issue Aug 17, 2013 · 5 comments
Closed

Enable Ctrl+C copy selection while in vim-mode #688

clojens opened this issue Aug 17, 2013 · 5 comments

Comments

@clojens
Copy link

@clojens clojens commented Aug 17, 2013

I don't know about you guys, but old habits die slow and one keystroke combination in particular I've found myself returning to is, while typing text in LightTable with vim on, is to Shift+Home or Home, Shift+End and then close up with a Ctrl+C to copy the whole thing.

It seems that at the moment, it doesn't do anything, I was wondering if it were possible to, while maintaining also of course the yank y in normal-mode of vim, to enable the Ctrl+C copy behaviour also when in vim insert-mode i. Not sure if it's possible though... or even desirable?

Thanks for your work,
Rob

@jcswart
Copy link

@jcswart jcswart commented Aug 25, 2013

I am on a mac so I use CMD + C, but this behavior works for me. I can copy the whole file by:

  • In vim mode:
    • ggyG => copy all
  • In vim insert mode:
    • Highlight all w/ mouse or keyboard + (CMD C) => copy all

It may be something on your end.

@ibdknox
Copy link
Member

@ibdknox ibdknox commented Aug 26, 2013

Ctrl+C is a default vim binding for escaping insert mode. You can easily rebind this yourself though. In your user keymap:

:editor.keys.vim {"ctrl-c" [:editor.copy]}

@clojens
Copy link
Author

@clojens clojens commented Aug 27, 2013

Great, thanks for the tip.

@mynomoto
Copy link

@mynomoto mynomoto commented Nov 10, 2013

Solved: This issue should be closed.

@crantok
Copy link

@crantok crantok commented Aug 3, 2015

Got directed here from codemirror/CodeMirror#3075 and was grateful for the tip. I don't know whether the original config structure still works but I did the following successfully and have pasted it in here case any noobs find it useful.

;; User keymap
[
 [:editor.keys.vim "ctrl-c" :editor.copy]
 [:editor.keys.vim "ctrl-x" :editor.cut]
 [:editor.keys.vim "ctrl-v" :editor.paste]
 [:editor.keys.vim "ctrl-z" :editor.undo]
 [:editor.keys.vim "ctrl-y" :editor.redo]
 ;; ...
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants