I'm starting to think that using the regular C-x C-c C-v keys for kill-ring operations make sense, as they're used that way in every other program I use regularly. (And I'm starting to develop conflicting muscle memories.) However, I use evil-mode
. Is there a way to integrate cua-mode
(with keys) and evil-insert-state
?
A little bit late to the party but I use the following:
(define-key evil-insert-state-map (kbd "C-c") 'cua-copy-region)
(define-key evil-insert-state-map (kbd "C-v") 'cua-paste)
(define-key evil-insert-state-map (kbd "C-x") 'cua-cut-region)
(define-key evil-insert-state-map (kbd "C-z") 'undo-tree-undo)
(define-key evil-insert-state-map (kbd "C-y") 'undo-tree-redo)
This also includes undo and redo for C-z
and C-y
and requires the undo-tree
package. Keep in mind that if you want to use the usual Emacs shortcuts like C-x C-c
to quit Emacs you'll need to leave Insert State
first.
-
Ideally, I'd like to do the normal thing where
C-x C-c
andC-x
are disambiguated using timers (or any of the other methodscua-mode
uses in a regular Emacs setup). – PythonNut Dec 8 '16 at 1:28 -
F2
and co. do me no favors (although they may be great for other people). While I do usevim
style bindings for much of my pasting, I do access and manipulate the kill ring ininsert
state as well.C-v
is faster thanESC p i
or evenjj p i
. Earlier, I had no trouble withC-w
and co. but recently I've had to use domain specific editors for my job, and now my muscles are confused. I think consistency may end up being better, although I'm not entirely sure, as I can't test. – PythonNut Jul 10 '16 at 2:40