[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-surround a4a04c6f01 075/175: Merge pull request #74 f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-surround a4a04c6f01 075/175: Merge pull request #74 from lislon/surround-repeat |
Date: |
Mon, 9 Oct 2023 13:01:04 -0400 (EDT) |
branch: elpa/evil-surround
commit a4a04c6f016528502f0d7d05ea7a8c6c0912e3ed
Merge: 8c03039e0e 277759d894
Author: Tim Harper <timcharper@gmail.com>
Commit: Tim Harper <timcharper@gmail.com>
Merge pull request #74 from lislon/surround-repeat
Fix repeat action (.) for ys and yS operators.
---
evil-surround.el | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/evil-surround.el b/evil-surround.el
index 0841bcf3c4..d18af37645 100755
--- a/evil-surround.el
+++ b/evil-surround.el
@@ -235,6 +235,16 @@ column."
(evil-surround-region ibeg iend t char)))
beg end nil)))
+(defun evil-surround-call-with-repeat (callback)
+ "Record keystrokes to repeat surround-region operator and it's motion.
+This is necessary because `evil-yank' operator is not repeatable (:repeat nil)"
+ (evil-repeat-start)
+ (evil-repeat-record "y")
+ (evil-repeat-record (this-command-keys))
+ (call-interactively callback)
+ (evil-repeat-keystrokes 'post)
+ (evil-repeat-stop))
+
;; Dispatcher function in Operator-Pending state.
;; "cs" calls `evil-surround-change', "ds" calls `evil-surround-delete',
;; and "ys" calls `evil-surround-region'.
@@ -252,7 +262,7 @@ Otherwise call `evil-surround-region'."
(call-interactively 'evil-surround-delete))
(t
(evil-surround-setup-surround-line-operators)
- (call-interactively 'evil-surround-region))))
+ (evil-surround-call-with-repeat 'evil-surround-region))))
(evil-define-command evil-Surround-edit (operation)
"Like evil-surround-edit, but for surrounding with additional new-lines.
@@ -265,7 +275,7 @@ It does nothing for change / delete."
((eq operation 'delete) nil)
(t
(evil-surround-setup-surround-line-operators)
- (call-interactively 'evil-Surround-region))))
+ (evil-surround-call-with-repeat 'evil-Surround-region))))
(evil-define-operator evil-surround-region (beg end type char &optional
force-new-line)
"Surround BEG and END with CHAR.
- [nongnu] elpa/evil-surround b2d9aebfe9 007/175: fixes whitespace + 1 munching issue when deleting surrounding brackets + space, (continued)
- [nongnu] elpa/evil-surround b2d9aebfe9 007/175: fixes whitespace + 1 munching issue when deleting surrounding brackets + space, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround fc676618e1 013/175: Make surround-pairs-alist buffer local., ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround a936638bec 002/175: Began port. Surround region working. Change surround/delete surround not., ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 205c650d7f 008/175: Refactor surround-pair for readability, flexibility. Subtle behavior change, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 67a82903ec 009/175: Use text object keymaps, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround e25f5f9c00 015/175: Add note about sentence behavior with link to issue., ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround ac3f8ca8b0 014/175: Add readme., ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 0a6741684b 024/175: Merge pull request #13 from milkypostman/master, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 92eee31db7 028/175: Fix link to Evil, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround f33d940264 036/175: Rename surround.el to evil-surround.el, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround a4a04c6f01 075/175: Merge pull request #74 from lislon/surround-repeat,
ELPA Syncer <=
- [nongnu] elpa/evil-surround 16c534b173 089/175: Unset execute permission for files, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround eda6b0d6ca 079/175: Merge pull request #78 from vyp/#55, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 50c10ab484 025/175: add autoloads to interactive functions for use in emacs proper, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 2de26062dd 031/175: Fix doc for surround delete operator, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 88f371a77f 029/175: Use `surround-line' instead of `evil-line' for linewise operations, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 47721ca824 035/175: Improve surround-outer-overlay and surround-inner-overlay (issue/30), ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 277534ce75 003/175: Replaced with Vegard's port of vimpulse-surround, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 0209cf9170 004/175: adds angle bracket surround, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround d911f1eb70 012/175: Merge pull request #3 from epsilon47/master, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround b40d2b6542 017/175: Merge pull request #7 from cofi/docs, ELPA Syncer, 2023/10/09