feature/evil: new +evil:align-right command
Bound to :ral[ign]
This commit is contained in:
parent
a26755a089
commit
7574e13677
2 changed files with 12 additions and 0 deletions
|
@ -36,6 +36,7 @@
|
|||
;; Editing
|
||||
(ex! "@" #'+evil:macro-on-all-lines) ; TODO Test me
|
||||
(ex! "al[ign]" #'+evil:align)
|
||||
(ex! "ral[ign]" #'+evil:align-right)
|
||||
(ex! "enhtml" #'+web:encode-html-entities)
|
||||
(ex! "dehtml" #'+web:decode-html-entities)
|
||||
(ex! "mc" #'+evil:mc)
|
||||
|
|
|
@ -176,6 +176,17 @@ line)."
|
|||
(concat "\\(\\s-*\\)" (evil-transform-vim-style-regexp pattern))
|
||||
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 ------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue