Add multiple-cursors, expand-region

This commit is contained in:
eriedaberrie 2023-11-04 16:29:34 -07:00
parent 1755239637
commit 710dd1bdba

35
init.el
View file

@ -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-<mouse-1>" . 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)