[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7ca301b 334/348: swiper.el (swiper-goto-start-of-match) Ne
From: |
Oleh Krehel |
Subject: |
[elpa] master 7ca301b 334/348: swiper.el (swiper-goto-start-of-match) New defcustom |
Date: |
Sat, 8 Apr 2017 11:04:25 -0400 (EDT) |
branch: master
commit 7ca301b444d1208dbe08060529669bafced72a41
Author: Evgeni Kolev <address@hidden>
Commit: Oleh Krehel <address@hidden>
swiper.el (swiper-goto-start-of-match) New defcustom
When non-nil, swiper default action will go to the beginning of the
match instead of on its end. This behavior is inspired by vim's and
evil's way of searching.
Fixes #944
Fixes #942
---
swiper.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/swiper.el b/swiper.el
index 7aa2875..c9b05db 100644
--- a/swiper.el
+++ b/swiper.el
@@ -77,6 +77,11 @@
:type 'boolean
:group 'swiper)
+(defcustom swiper-goto-start-of-match nil
+ "When non-nil, go to the start of the match, not its end."
+ :type 'boolean
+ :group 'swiper)
+
(defvar swiper-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "M-q") 'swiper-query-replace)
@@ -697,7 +702,8 @@ WND, when specified is the window."
#'line-move
#'forward-line)
ln)
- (re-search-forward re (line-end-position) t)
+ (when (and (re-search-forward re (line-end-position) t)
swiper-goto-start-of-match)
+ (goto-char (match-beginning 0)))
(swiper--ensure-visible)
(cond (swiper-action-recenter
(recenter))
- [elpa] master 9d693ec 158/348: Use a lighter color for ivy-remote in dark themes, (continued)
- [elpa] master 9d693ec 158/348: Use a lighter color for ivy-remote in dark themes, Oleh Krehel, 2017/04/08
- [elpa] master 9b13aa4 170/348: ivy.el (ivy-flip): Allow to flip candidates/input, Oleh Krehel, 2017/04/08
- [elpa] master 2bc1d7b 276/348: ivy.el (ivy--occur-insert-lines): Scroll to first cand, Oleh Krehel, 2017/04/08
- [elpa] master b1c6cc8 300/348: swiper.el (swiper-all): Fix case-fold-search, Oleh Krehel, 2017/04/08
- [elpa] master c3f5f28 305/348: Add circe-mode to swiper-font-lock-exclude, Oleh Krehel, 2017/04/08
- [elpa] master 7100925 302/348: ivy.el (ivy-completing-read-handlers-alist): New defcustom, Oleh Krehel, 2017/04/08
- [elpa] master b894874 309/348: ivy.el (ivy-occur-grep-mode): Call wgrep-setup if available, Oleh Krehel, 2017/04/08
- [elpa] master 80d3fe3 310/348: Fix compilation warnings, Oleh Krehel, 2017/04/08
- [elpa] master b0ccc7a 312/348: README.md: Recommend enable-recursive-minibuffers, Oleh Krehel, 2017/04/08
- [elpa] master 1ac1cc1 316/348: ivy.el (ivy-completing-read): Don't require-match for null, Oleh Krehel, 2017/04/08
- [elpa] master 7ca301b 334/348: swiper.el (swiper-goto-start-of-match) New defcustom,
Oleh Krehel <=
- [elpa] master fc2e198 335/348: swiper.el (swiper--action): Set evil search direction to forward, Oleh Krehel, 2017/04/08
- [elpa] master 718a06b 345/348: doc/Changelog.org: Fix links, Oleh Krehel, 2017/04/08
- [elpa] master 802c9da 271/348: counsel.el: Add counsel-command-history, Oleh Krehel, 2017/04/08
- [elpa] master ee91a25 283/348: ivy.el (ivy--sort-maybe): Fix byte-compiler warning, Oleh Krehel, 2017/04/08
- [elpa] master dc693c3 280/348: Make ivy--flx-sort more intelligent, Oleh Krehel, 2017/04/08
- [elpa] master 182e35e 298/348: Apply search highlighting for evil when applicable, Oleh Krehel, 2017/04/08
- [elpa] master aedea1a 289/348: counsel.el (counsel-package): Add func to manage packages., Oleh Krehel, 2017/04/08
- [elpa] master b9c52be 301/348: counsel.el (counsel-git): Add "x" action, Oleh Krehel, 2017/04/08
- [elpa] master dbeb5b1 303/348: Ensure counsel-M-x preserves last-command, Oleh Krehel, 2017/04/08
- [elpa] master ae3ca26 117/348: counsel.el (counsel-locate-action-extern): Add w32 support, Oleh Krehel, 2017/04/08