[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/iedit e48b52e353 185/301: Merge branch 'incremental-select
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/iedit e48b52e353 185/301: Merge branch 'incremental-select' of git://github.com/bmag/iedit into bmag-incremental-select |
Date: |
Mon, 10 Jan 2022 22:59:01 -0500 (EST) |
branch: elpa/iedit
commit e48b52e3537bc929bdc4bb009c4be8265453ec2b
Merge: d335d6842a adb0d2e92d
Author: Victor Ren <victorhge@gmail.com>
Commit: Victor Ren <victorhge@gmail.com>
Merge branch 'incremental-select' of git://github.com/bmag/iedit into
bmag-incremental-select
---
iedit.el | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/iedit.el b/iedit.el
index 7bc992f98f..2e2f2a219d 100644
--- a/iedit.el
+++ b/iedit.el
@@ -245,6 +245,8 @@ This is like `describe-bindings', but displays only Iedit
keys."
(define-key map (kbd "M-I") 'iedit-restrict-current-line)
(define-key map (kbd "M-{") 'iedit-expand-up-a-line)
(define-key map (kbd "M-}") 'iedit-expand-down-a-line)
+ (define-key map (kbd "M-[") 'iedit-expand-up-to-occurence)
+ (define-key map (kbd "M-]") 'iedit-expand-down-to-occurence)
(define-key map (kbd "M-G") 'iedit-apply-global-modification)
(define-key map (kbd "M-C") 'iedit-toggle-case-sensitive)
map)
@@ -592,6 +594,38 @@ the region back up one line."
(iedit-expand-by-a-line 'bottom
(if arg -1 1)))
+(defun iedit-down-occurence-pos ()
+ "Get position of next occurence past `iedit-last-occurrence'"
+ (save-excursion
+ (goto-char (1+ (iedit-last-occurrence)))
+ (search-forward-regexp (iedit-current-occurrence-string))))
+
+(defun iedit-expand-down-to-occurence ()
+ "Expand the search region downwards until reaching a new occurence.
+If no such occurence can be found, throw an error."
+ (interactive)
+ (let ((last-pos (iedit-last-occurrence))
+ (next-pos (iedit-down-occurence-pos)))
+ (iedit-expand-by-a-line 'bottom
+ (- (line-number-at-pos next-pos)
+ (line-number-at-pos last-pos)))))
+
+(defun iedit-up-occurrence-pos ()
+ "Get position of next occurence past `iedit-first-occurrence'"
+ (save-excursion
+ (goto-char (iedit-first-occurrence))
+ (search-backward-regexp (iedit-current-occurrence-string))))
+
+(defun iedit-expand-up-to-occurence ()
+ "Expand the search region upwards until reaching a new occurence.
+If no such occurence can be found, throw an error."
+ (interactive)
+ (let ((first-pos (iedit-first-occurrence))
+ (prev-pos (iedit-up-occurrence-pos)))
+ (iedit-expand-by-a-line 'top
+ (- (line-number-at-pos first-pos)
+ (line-number-at-pos prev-pos)))))
+
(defun iedit-restrict-region (beg end &optional inclusive)
"Restricting Iedit mode in a region."
(when iedit-buffering
- [nongnu] elpa/iedit 6cc86d58e6 086/301: Merge pull request #6 from gorakhargosh/master, (continued)
- [nongnu] elpa/iedit 6cc86d58e6 086/301: Merge pull request #6 from gorakhargosh/master, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 4cf803d9cb 092/301: Skip the first occurrence for occur-edit-mode, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit c5ab2c593d 094/301: Avoid to restore Iedit mode when restoring desktop, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 95eb44ee30 117/301: Add new function iedit-add-next-occurrence-overlay, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit b94c75e8c6 107/301: Move iedit-help-keymap to iedit.el, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 84896f8be0 104/301: *** empty log message ***, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 962fcdb6cd 124/301: Fix failed test cases, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 6d16d92a5a 112/301: replace iedit-occurrence-face with real face, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 57beb10db5 141/301: Remove all the dependency to the order of iedit-occurrences-overlays, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 4efe511684 128/301: allow iedit-rectangle-mode to take beg end programatically, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit e48b52e353 185/301: Merge branch 'incremental-select' of git://github.com/bmag/iedit into bmag-incremental-select,
ELPA Syncer <=
- [nongnu] elpa/iedit 668ea99c51 195/301: Allow prefix for expand functions, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 007a6f9c28 206/301: check if mc present, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 7885f4beda 178/301: iedit-restrict-current-line resets expand state, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 79d0f4f3dc 155/301: Merge pull request #32 from mbneedham/master, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit df2de42fa1 149/301: Remove test-util.el, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 83c037d678 156/301: Fix infinite loop problem in iedit-rect-mode, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit b95c35107a 176/301: Merge branch 'master' of github.com:victorhge/iedit, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 0d6193362d 144/301: Follow error convention, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit c2763baaf6 168/301: Do not enable iedit from a failing isearch, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 4e8b9453ac 261/301: Update occurrences in `post-command-hook', ELPA Syncer, 2022/01/10