Conclude multiple-cursors-mode with <return>

- you can still add a newline with C-m if you're into that kind of pain.
This commit is contained in:
Magnar Sveen 2012-01-26 11:49:22 +01:00
parent 18f7f1ad66
commit a4d406e6e1

View File

@ -195,12 +195,13 @@ you should disable multiple-cursors-mode."
(defvar mc/keymap nil
"Keymap while multiple cursors are active.
Main goal of the keymap is to rebind C-g to conclude multiple
cursors editing.")
Main goal of the keymap is to rebind C-g and <return> to conclude
multiple cursors editing.")
(if mc/keymap
nil
(setq mc/keymap (make-sparse-keymap))
(define-key mc/keymap (kbd "C-g") 'multiple-cursors-mode))
(define-key mc/keymap (kbd "C-g") 'multiple-cursors-mode)
(define-key mc/keymap (kbd "<return>") 'multiple-cursors-mode))
(define-minor-mode multiple-cursors-mode
"Mode while multiple cursors are active."