feature/evil: redesign +evil:align; bang = repeat align
This commit is contained in:
parent
5711bfc903
commit
a26755a089
1 changed files with 6 additions and 7 deletions
|
@ -167,15 +167,14 @@ evil-window-move-* (e.g. `evil-window-move-far-left')"
|
||||||
|
|
||||||
;;;###autoload (autoload '+evil:align "feature/evil/autoload/evil" nil t)
|
;;;###autoload (autoload '+evil:align "feature/evil/autoload/evil" nil t)
|
||||||
(evil-define-operator +evil:align (beg end pattern &optional bang)
|
(evil-define-operator +evil:align (beg end pattern &optional bang)
|
||||||
"Ex interface to `align-regexp'. Accepts vim-style regexps."
|
"Ex interface to `align-regexp'. PATTERN is a vim-style regexp. If BANG,
|
||||||
(interactive "<r><//><!>")
|
repeat the alignment for all matches (otherwise just the first match on each
|
||||||
|
line)."
|
||||||
|
(interactive "<r><//g><!>")
|
||||||
(align-regexp
|
(align-regexp
|
||||||
beg end
|
beg end
|
||||||
(concat "\\(\\s-*\\)"
|
(concat "\\(\\s-*\\)" (evil-transform-vim-style-regexp pattern))
|
||||||
(if bang
|
1 1 bang))
|
||||||
(regexp-quote pattern)
|
|
||||||
(evil-transform-vim-style-regexp pattern)))
|
|
||||||
1 1))
|
|
||||||
|
|
||||||
|
|
||||||
;; --- wgrep ------------------------------
|
;; --- wgrep ------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue