Skip to content

swiper-isearch directon change #2158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Ergus opened this issue Jul 22, 2019 · 1 comment
Closed

swiper-isearch directon change #2158

Ergus opened this issue Jul 22, 2019 · 1 comment

Comments

@Ergus
Copy link
Contributor

Ergus commented Jul 22, 2019

Hi:
This is not really an issue, but more like a question. When I am searching with swiper and I want to go back actually I use C-p/C-n, but I want to bind also C-r.

The question is:

  1. The cursor does not move to the other extreme of the candidate (like in isearch) when inverting the candidate; is it possible to enable that somehow?
  2. The previous point 1) could be solved toggling between swiper-isearch <-> swiper-isearch-backward. But when I set C-r as swiper-isearch-backward in the swiper map the prompt opens empty so maybe I am missing something.
  3. My actual workaround is to bind C-r to ivy-previous-line-or-history but this keeps the point one and maybe should be commented in the documentation.

Is it there a better recommended way to solve this?

Thanks in advance,
Ergus

@abo-abo
Copy link
Owner

abo-abo commented Jul 23, 2019

Thanks. This should work now:

(define-key swiper-isearch-map (kbd "C-r") 'ivy-previous-line-or-history)

astoff pushed a commit to astoff/swiper that referenced this issue Jan 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants