From a26755a0894c0958f9cb18343dee59c7186c3f86 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 20 Mar 2018 23:55:24 -0400 Subject: [PATCH] feature/evil: redesign +evil:align; bang = repeat align --- modules/feature/evil/autoload/evil.el | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/feature/evil/autoload/evil.el b/modules/feature/evil/autoload/evil.el index b1f6d1b5b..1458997ec 100644 --- a/modules/feature/evil/autoload/evil.el +++ b/modules/feature/evil/autoload/evil.el @@ -167,15 +167,14 @@ evil-window-move-* (e.g. `evil-window-move-far-left')" ;;;###autoload (autoload '+evil:align "feature/evil/autoload/evil" nil t) (evil-define-operator +evil:align (beg end pattern &optional bang) - "Ex interface to `align-regexp'. Accepts vim-style regexps." - (interactive "") + "Ex interface to `align-regexp'. PATTERN is a vim-style regexp. If BANG, +repeat the alignment for all matches (otherwise just the first match on each +line)." + (interactive "") (align-regexp beg end - (concat "\\(\\s-*\\)" - (if bang - (regexp-quote pattern) - (evil-transform-vim-style-regexp pattern))) - 1 1)) + (concat "\\(\\s-*\\)" (evil-transform-vim-style-regexp pattern)) + 1 1 bang)) ;; --- wgrep ------------------------------