diff --git a/.emacs.d/init.el b/.emacs.d/init.el index dd1bfba0..2c4a0d0a 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -286,7 +286,6 @@ To view where the bindings are set in your config files, lookup (setq mc/list-file (concat emacs-cache-folder "mc-lists.el")) ;; Load the file at the new location. (load mc/list-file t) - (global-unset-key (kbd "C-")) (define-key mickey-minor-mode-map (kbd "C-") 'mc/add-cursor-on-click) (define-key mickey-minor-mode-map (kbd "C-x M-r") 'mc/edit-lines) (define-key mickey-minor-mode-map (kbd "C-x M-m") 'mc/mark-more-like-this-extended) diff --git a/.emacs.d/lisp/main.el b/.emacs.d/lisp/main.el index d5340e7f..2fa55bc0 100644 --- a/.emacs.d/lisp/main.el +++ b/.emacs.d/lisp/main.el @@ -246,6 +246,8 @@ ;;; Move mouse away. ;; (mouse-avoidance-mode 'banish) +;;; That binding is not very useful and gets in the way of C-. +(global-unset-key (kbd "C-")) ;;; Display defun in mode line. (which-function-mode) diff --git a/.emacs.d/lisp/tool-evil.el b/.emacs.d/lisp/tool-evil.el index 59414b43..5a4460ca 100644 --- a/.emacs.d/lisp/tool-evil.el +++ b/.emacs.d/lisp/tool-evil.el @@ -76,9 +76,9 @@ ;; TODO: show-marks with helm? Evil mixes up the mark ring. ;; Back to where search started with C-o or ''(?). - (evil-global-set-key 'normal "'" 'helm-mark-or-exchange-rect) + ;; (evil-global-set-key 'normal "'" 'helm-mark-or-exchange-rect) ;; TODO: Yank ring pasting behaves like Emacs, not Vim. - (evil-global-set-key 'normal "\M-p" 'helm-show-kill-ring) + ;; (evil-global-set-key 'normal "\M-p" 'helm-show-kill-ring) ;; TODO: Should we stick to M-based bindings or use C-based? ;; Magit uses C-jk, helm uses C-space. @@ -183,12 +183,17 @@ (call-interactively (key-binding (kbd "M-."))))) ;; Multiple cursors. -;; TODO: Figure out better bindings, current ones shadow 'paste', history browsing, Magit update "gr" (Use ?g instead), etc. +;; This shadows evil-magit's "gr", but we can use "?g" for that instead. +;; It shadows C-n/p (`evil-paste-pop'), but we use `helm-show-kill-ring' on +;; another binding. (when (require 'evil-mc nil t) (global-evil-mc-mode 1) - ;; (when (require 'evil-mc-extras nil t) - ;; (global-evil-mc-extras-mode 1)) - ) + (define-key evil-mc-key-map (kbd "C-") 'evil-mc-toggle-cursor-on-click) + ;; Don't shadow evil's standard keys. TODO: Is \C-t ever needed? Evil's normal binding is `pop-tag-mark'. + ;; (evil-define-key '(normal visual) evil-mc-key-map "\C-t" nil) + (set-face-attribute 'evil-mc-cursor-default-face nil :inherit nil :inverse-video nil :box "white") + (when (require 'evil-mc-extras nil t) + (global-evil-mc-extras-mode 1))) (provide 'tool-evil)