mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-13 13:13:35 -05:00
feature/evil: new +evil:align-right command
Bound to :ral[ign]
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
;; Editing
|
;; Editing
|
||||||
(ex! "@" #'+evil:macro-on-all-lines) ; TODO Test me
|
(ex! "@" #'+evil:macro-on-all-lines) ; TODO Test me
|
||||||
(ex! "al[ign]" #'+evil:align)
|
(ex! "al[ign]" #'+evil:align)
|
||||||
|
(ex! "ral[ign]" #'+evil:align-right)
|
||||||
(ex! "enhtml" #'+web:encode-html-entities)
|
(ex! "enhtml" #'+web:encode-html-entities)
|
||||||
(ex! "dehtml" #'+web:decode-html-entities)
|
(ex! "dehtml" #'+web:decode-html-entities)
|
||||||
(ex! "mc" #'+evil:mc)
|
(ex! "mc" #'+evil:mc)
|
||||||
|
@@ -176,6 +176,17 @@ line)."
|
|||||||
(concat "\\(\\s-*\\)" (evil-transform-vim-style-regexp pattern))
|
(concat "\\(\\s-*\\)" (evil-transform-vim-style-regexp pattern))
|
||||||
1 1 bang))
|
1 1 bang))
|
||||||
|
|
||||||
|
;;;###autoload (autoload '+evil:align-right "feature/evil/autoload/evil" nil t)
|
||||||
|
(evil-define-operator +evil:align-right (beg end pattern &optional bang)
|
||||||
|
"Like `+evil:align', except alignments are right-justified. PATTERN is a
|
||||||
|
vim-style regexp. If BANG, repeat the alignment for all matches (otherwise just
|
||||||
|
the first match on each line)."
|
||||||
|
(interactive "<r><//g><!>")
|
||||||
|
(align-regexp
|
||||||
|
beg end
|
||||||
|
(concat "\\(" (evil-transform-vim-style-regexp pattern) "\\)")
|
||||||
|
-1 1 bang))
|
||||||
|
|
||||||
|
|
||||||
;; --- wgrep ------------------------------
|
;; --- wgrep ------------------------------
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user