feature/evil: improve idempotency
This commit is contained in:
parent
532db96645
commit
992e636b31
1 changed files with 18 additions and 16 deletions
|
@ -213,12 +213,13 @@ across windows."
|
||||||
(cons (format "(%s " (or (read-string "(") "")) ")"))
|
(cons (format "(%s " (or (read-string "(") "")) ")"))
|
||||||
|
|
||||||
;; Add escaped-sequence support to embrace
|
;; Add escaped-sequence support to embrace
|
||||||
(push (cons ?\\ (make-embrace-pair-struct
|
(cl-pushnew (cons ?\\ (make-embrace-pair-struct
|
||||||
:key ?\\
|
:key ?\\
|
||||||
:read-function #'+evil--embrace-escaped
|
:read-function #'+evil--embrace-escaped
|
||||||
:left-regexp "\\[[{(]"
|
:left-regexp "\\[[{(]"
|
||||||
:right-regexp "\\[]})]"))
|
:right-regexp "\\[]})]"))
|
||||||
(default-value 'embrace--pairs-list))
|
(default-value 'embrace--pairs-list)
|
||||||
|
:key #'car)
|
||||||
|
|
||||||
;; Add extra pairs
|
;; Add extra pairs
|
||||||
(add-hook 'LaTeX-mode-hook #'embrace-LaTeX-mode-hook)
|
(add-hook 'LaTeX-mode-hook #'embrace-LaTeX-mode-hook)
|
||||||
|
@ -299,12 +300,16 @@ the new algorithm is confusing, like in python or ruby."
|
||||||
:config
|
:config
|
||||||
(global-evil-mc-mode +1)
|
(global-evil-mc-mode +1)
|
||||||
|
|
||||||
;; Add custom commands to whitelisted commands
|
(unless doom-init-p
|
||||||
(dolist (fn '(doom/deflate-space-maybe doom/inflate-space-maybe
|
;; Add custom commands to whitelisted commands
|
||||||
doom/backward-to-bol-or-indent doom/forward-to-last-non-comment-or-eol
|
(dolist (fn '(doom/deflate-space-maybe doom/inflate-space-maybe
|
||||||
doom/backward-kill-to-bol-and-indent doom/newline-and-indent))
|
doom/backward-to-bol-or-indent doom/forward-to-last-non-comment-or-eol
|
||||||
(push (cons fn '((:default . evil-mc-execute-default-call)))
|
doom/backward-kill-to-bol-and-indent doom/newline-and-indent))
|
||||||
evil-mc-custom-known-commands))
|
(push (cons fn '((:default . evil-mc-execute-default-call)))
|
||||||
|
evil-mc-custom-known-commands))
|
||||||
|
|
||||||
|
;; disable evil-escape in evil-mc; causes unwanted text on invocation
|
||||||
|
(push 'evil-escape-mode evil-mc-incompatible-minor-modes))
|
||||||
|
|
||||||
(defun +evil|escape-multiple-cursors ()
|
(defun +evil|escape-multiple-cursors ()
|
||||||
"Clear evil-mc cursors and restore state."
|
"Clear evil-mc cursors and restore state."
|
||||||
|
@ -312,10 +317,7 @@ the new algorithm is confusing, like in python or ruby."
|
||||||
(evil-mc-undo-all-cursors)
|
(evil-mc-undo-all-cursors)
|
||||||
(evil-mc-resume-cursors)
|
(evil-mc-resume-cursors)
|
||||||
t))
|
t))
|
||||||
(add-hook '+evil-esc-hook #'+evil|escape-multiple-cursors)
|
(add-hook '+evil-esc-hook #'+evil|escape-multiple-cursors))
|
||||||
|
|
||||||
;; disable evil-escape in evil-mc; causes unwanted text on invocation
|
|
||||||
(push 'evil-escape-mode evil-mc-incompatible-minor-modes))
|
|
||||||
|
|
||||||
|
|
||||||
(def-package! evil-snipe
|
(def-package! evil-snipe
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue