branch: elpa/isl
commit 9d1809fca062f01a9f8ea25f021f163a3617bbce
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>
Add command to go to closest match from start
---
isearch-light.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/isearch-light.el b/isearch-light.el
index e3f2df3f14d..69eb71925bb 100644
--- a/isearch-light.el
+++ b/isearch-light.el
@@ -151,6 +151,7 @@ in pattern."
(define-key map (kbd "M-r") 'isl-change-matching-style)
(define-key map (kbd "M-<") 'isl-goto-first)
(define-key map (kbd "M->") 'isl-goto-last)
+ (define-key map (kbd "M-=") 'isl-goto-closest-from-start)
(define-key map (kbd "M-s") 'isl-jump-to-helm-occur)
(define-key map (kbd "C-;") 'isl-jump-to-iedit-mode)
map))
@@ -201,6 +202,12 @@ It put overlay on current position, move to next overlay
using
(interactive)
(isl--find-and-goto-overlay (car (last isl--item-overlays))))
+(defun isl-goto-closest-from-start ()
+ "Goto closest match from start."
+ (interactive)
+ (isl--find-and-goto-overlay
+ (isl-closest-overlay isl-initial-pos isl--item-overlays)))
+
(defun isl-goto-next ()
"Go to next match in isl."
(interactive)