Add multiple-cursors
This commit is contained in:
parent
d6e4880eb6
commit
0da62c7715
35
init.el
35
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-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)
|
||||
|
|
Loading…
Reference in a new issue