diff --git a/init.el b/init.el index a24bc7b..9b9898d 100644 --- a/init.el +++ b/init.el @@ -101,6 +101,35 @@ (keymap-global-set "C-l" (lambda () (interactive) (god-mode-all 0)))) (god-mode)) +(use-package multiple-cursors + :bind + ("C-S-c" . mc/edit-lines) + ("C->" . mc/mark-next-like-this) + ("C-<" . mc/mark-prev-like-this) + ("C-+" . mc/mark-all-like-this) + ("C-|" . mc/mark-pop) + ("C-c c" . mc/mark-all-in-region) + ("C-c C" . mc/mark-all-in-region-regexp) + ("C-c u" . mc/mark-all-like-this-dwim) + ("C-c U" . mc/mark-all-dwim) + ("C-S-" . mc/add-cursor-on-click) + :custom + (mc/always-run-for-all t) + :init + ;; NOTE: For SOME REASON lispy also defvars the mc cmds list to nil when + ;; sourced so they need to be modified twice + (let ((add-cmds (lambda () + (dolist (f '(god-local-mode + god-mode-all + god-global-mode)) + (add-to-list 'mc/cmds-to-run-once f))))) + ;; Because multiple-cursors-core is what actually gets autoloaded + (eval-after-load 'multiple-cursors-core add-cmds) + (eval-after-load 'lispy add-cmds))) + +(use-package expand-region + :bind ("C-=" . er/expand-region)) + (use-package avy :bind ("C-'" . avy-goto-char) @@ -764,9 +793,9 @@ :if my-is-nixos :ensure nil :bind - ("C-c M m" . mu4e) - ("C-c M c" . mu4e-compose-new) - ("C-c M u" . mu4e-update-mail-and-index) + ("C-c m m" . mu4e) + ("C-c m c" . mu4e-compose-new) + ("C-c m u" . mu4e-update-mail-and-index) :hook (mu4e-view-mode . my-inhibit-hl-line-mode) (message-mode . my-double-space-sentence)