Henrik Lissner 2023-08-20 22:16:12 +02:00
parent ea616350c7
commit 21df7d0beb
No known key found for this signature in database
GPG Key ID: B60957CA074D39A3
4 changed files with 18 additions and 39 deletions

View File

@ -64,7 +64,7 @@ PATTERN is a vim-style regexp. FLAGS is an optional string of characters.
Supports the following flags:
g Repeat alignment on all matches in each line"
(interactive "<r><//>")
(interactive "<r></>")
(align-regexp
beg end
(concat "\\(\\s-*\\)" (evil-transform-vim-style-regexp pattern))
@ -78,7 +78,7 @@ PATTERN is a vim-style regexp. FLAGS is an optional string of characters.
Supports the following flags:
g Repeat alignment on all matches in each line"
(interactive "<r><//>")
(interactive "<r></>")
(align-regexp
beg end
(concat "\\(" (evil-transform-vim-style-regexp pattern) "\\)")
@ -86,7 +86,7 @@ g Repeat alignment on all matches in each line"
;; ;;;###autoload (autoload '+evil:sort "editor/evil/autoload/ex" nil nil)
;; (evil-define-command +evil:sort (beg end &optional pattern flags reverse)
;; (interactive "<r><//><!>"))
;; (interactive "<r></><!>"))
;;;###autoload (autoload '+evil:open-scratch-buffer "editor/evil/autoload/ex" nil t)
(evil-define-operator +evil:open-scratch-buffer (bang)

View File

@ -202,34 +202,6 @@ directives. By default, this only recognizes C directives.")
(advice-add #'evil-open-above :around #'+evil--insert-newline-above-and-respect-comments-a)
(advice-add #'evil-open-below :around #'+evil--insert-newline-below-and-respect-comments-a)
;; --- custom interactive codes -----------
;; These arg types will highlight matches in the current buffer
(evil-ex-define-argument-type regexp-match
:runner (lambda (flag &optional arg) (+evil-ex-regexp-match flag arg 'inverted)))
(evil-ex-define-argument-type regexp-global-match
:runner +evil-ex-regexp-match)
(defun +evil--regexp-match-args (arg)
(when (evil-ex-p)
(cl-destructuring-bind (&optional arg flags)
(evil-delimited-arguments arg 2)
(list arg (string-to-list flags)))))
;; Other commands can make use of this
(evil-define-interactive-code "<//>"
:ex-arg regexp-match
(+evil--regexp-match-args evil-ex-argument))
(evil-define-interactive-code "<//!>"
:ex-arg regexp-global-match
(+evil--regexp-match-args evil-ex-argument))
;; Forward declare these so that ex completion works, even if the autoloaded
;; functions aren't loaded yet.
(evil-add-command-properties '+evil:align :ex-arg 'regexp-match)
(evil-add-command-properties '+evil:align-right :ex-arg 'regexp-match)
(evil-add-command-properties '+multiple-cursors:evil-mc :ex-arg 'regexp-global-match)
;; Lazy load evil ex commands
(delq! 'evil-ex features)
(add-transient-hook! 'evil-ex (provide 'evil-ex))
@ -403,9 +375,16 @@ directives. By default, this only recognizes C directives.")
(use-package! evil-traces
:after evil-ex
:config
;; HACK: Temporary workaround for upstream incompatibility. See
;; mamapanda/evil-traces#5.
(defadvice! +evil--set-evil-ex-current-buffer-a (&rest _)
:before #'evil-ex-setup
(with-current-buffer evil-ex-current-buffer
(setq-local evil-ex-current-buffer (current-buffer))))
(pushnew! evil-traces-argument-type-alist
'(+evil:align . evil-traces-global)
'(+evil:align-right . evil-traces-global))
'(+evil:align-right . evil-traces-global)
'(+multiple-cursors:evil-mc . evil-traces-substitute))
(evil-traces-mode))

View File

@ -1,26 +1,26 @@
;; -*- no-byte-compile: t; -*-
;;; editor/evil/packages.el
(package! evil :pin "2ce03d412c4e93b0b89eb43d796c991806415b8a")
(package! evil :pin "60ba716bf500ca21cdf5a8f83101449a1cbe3413")
(package! evil-args :pin "2671071a4a57eaee7cc8c27b9e4b6fc60fd2ccd3")
(package! evil-easymotion :pin "f96c2ed38ddc07908db7c3c11bcd6285a3e8c2e9")
(package! evil-embrace :pin "7b5a539cfe7db238d860122c793a0cb2d329cc6e")
(package! evil-embrace :pin "3081d37811b6a3dfaaf01d578c7ab7a746c6064d")
(package! evil-escape
:recipe (:host github :repo "hlissner/evil-escape")
:pin "819f1ee1cf3f69a1ae920e6004f2c0baeebbe077")
(package! evil-exchange :pin "5f0a2d41434c17c6fb02e4f744043775de1c63a2")
(package! evil-indent-plus :pin "b4dacbfdb57f474f798bfbf5026d434d549eb65c")
(package! evil-lion :pin "a55eb647422342f6b1cf867f797b060b3645d9d8")
(package! evil-nerd-commenter :pin "8c0f23d46a3927b9f83c1c2c4590be53d0b740db")
(package! evil-nerd-commenter :pin "3b197a2b559b06a7cf39978704b196f53dac802a")
(package! evil-numbers :pin "7a1b62afc12da2b582bf84d722e7b10ca8b97065")
(package! evil-snipe :pin "c07788c35cf8cd8e652a494322fdc0643e30a89f")
(package! evil-surround :pin "f273821f575ace519066fb106ee45a5b8577475f")
(package! evil-surround :pin "8fad8540c490d94a820004f227552ca08e3e3857")
(package! evil-textobj-anyblock
:recipe (:host github
:repo "willghatch/evil-textobj-anyblock"
:branch "fix-inner-block")
:pin "29280cd71a05429364cdceef2ff595ae8afade4d")
(package! evil-traces :pin "290b5323542c46af364ec485c8ec9000040acf90")
(package! evil-traces :pin "d4c53bd6addbe1bce7c77fdc10314f24451a2ecf")
(package! evil-visualstar :pin "06c053d8f7381f91c53311b1234872ca96ced752")
(package! exato :pin "aee7af7b7a0e7551478f453d1de7d5b9cb2e06c4")
(package! evil-quick-diff
@ -35,4 +35,4 @@
(package! neotree)
(autoload 'neotree-make-executor "neotree" nil nil 'macro))
(package! evil-collection :pin "aaf3e0038e9255659fe0455729239c08498c4c0b"))
(package! evil-collection :pin "1ad283f5b7ac9320ac3d41bccfc71a52f714563a"))

View File

@ -68,7 +68,7 @@ FLAGS can be g and/or i; which mean the same thing they do in
`evil-ex-substitute'."
:evil-mc t
:keep-visual t
(interactive "<R><//!><!>")
(interactive "<R><g/><!>")
(unless (and (stringp pattern)
(not (string-empty-p pattern)))
(user-error "A regexp pattern is required"))