This commit is contained in:
Zelong Kuang
2025-12-22 10:51:46 +11:00
parent 697231fdec
commit e116a6b576
9 changed files with 247 additions and 11 deletions

View File

@@ -6,13 +6,9 @@
;; :config
;; (require 'smartparens-config))
(setq electric-pair-inhibit-predicate 'electric-pair-conservative-inhibit)
(electric-pair-mode t)
(use-package ace-window
:hook (ace-window-mode . ace-window-posframe-mode)
:bind ("M-o" . ace-window))
;; Yasnippet settings
(use-package yasnippet
:ensure t
@@ -39,5 +35,45 @@
(setq-default abbrev-mode t)
(setq abbrev-file-name (expand-file-name "abbrev.el" user-emacs-directory))
(use-package autorevert
:ensure nil
:diminish
:hook (after-init . global-auto-revert-mode))
(use-package multiple-cursors
:hook elpaca-after-init
:bind (("C-c m" . multiple-cursors-hydra/body)
("C-S-c C-S-c" . mc/edit-lines)
("C->" . mc/mark-next-like-this)
("C-<" . mc/mark-previous-like-this)
("C-c C-<" . mc/mark-all-like-this)
("C-M->" . mc/skip-to-next-like-this)
("C-M-<" . mc/skip-to-previous-like-this)
("s-<mouse-1>" . mc/add-cursor-on-click)
("C-S-<mouse-1>" . mc/add-cursor-on-click)
:map mc/keymap
("C-|" . mc/vertical-align-with-space))
:pretty-hydra
((:color amaranth :quit-key ("q" "C-g"))
("Up"
(("p" mc/mark-previous-like-this "prev")
("P" mc/skip-to-previous-like-this "skip")
("M-p" mc/unmark-previous-like-this "unmark")
("|" mc/vertical-align "align with input CHAR"))
"Down"
(("n" mc/mark-next-like-this "next")
("N" mc/skip-to-next-like-this "skip")
("M-n" mc/unmark-next-like-this "unmark"))
"Misc"
(("l" mc/edit-lines "edit lines" :exit t)
("a" mc/mark-all-like-this "mark all" :exit t)
("s" mc/mark-all-in-region-regexp "search" :exit t)
("<mouse-1>" mc/add-cursor-on-click "click"))
"% 2(mc/num-cursors) cursor%s(if (> (mc/num-cursors) 1) \"s\" \"\")"
(("0" mc/insert-numbers "insert numbers" :exit t)
("A" mc/insert-letters "insert letters" :exit t)))))
(use-package smart-region
:hook (after-init . smart-region-on))
(provide 'init-edit)