branch: master commit a267b3436d9267213fe7803b08e17c40afeab8c2 Author: killdash9 <killdash9> Commit: Oleh Krehel <ohwoeo...@gmail.com>
familiar isearch key bindings while helm is active --- swiper.el | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/swiper.el b/swiper.el index ade9068..3243069 100644 --- a/swiper.el +++ b/swiper.el @@ -96,6 +96,13 @@ (zerop (forward-line 1))) (nreverse candidates)))) +(defvar swiper--keymap + (let ((map (copy-keymap helm-map))) + (define-key map (kbd "C-s") 'helm-next-line) + (define-key map (kbd "C-r") 'helm-previous-line) + map) + "Allows you to go to next and previous hit isearch-style") + ;;;###autoload (defun swiper () "Interactive `occur' using `helm'." @@ -127,6 +134,7 @@ (filtered-candidate-transformer helm-fuzzy-highlight-matches) (action . swiper--action)) + :keymap swiper--keymap :preselect (format "^%d " swiper--anchor) :buffer "*swiper*"))