2

I frequently re-search the terms previously searched by isearch-forward in my current session. Assume that I have searched term1, term2, ... during my previous I-searches. When I do a new isearch-forward, I would like to have a quick access to my previous search terms (say term1, term2, ... ), maybe to use them again. For this I have to switch to the minibuffer by putting the cursor in front of I-search: then pressing Up-Arrow Down-Arrow to have the access to the previous search terms, then pressing RET after selecting one of them.

Is there the possibility to do this without switching to the minibuffer? I mean pressing Up-Arrow Down-Arrow just after calling isearch-forward results in the access to previous search terms.

1
  • 1
    C-h f isearch-forward tells you everything you are asking about. And so does using C-s followed by C-h. Ask Emacs.
    – Drew
    Commented Oct 8, 2015 at 18:50

1 Answer 1

8

With C-s C-s you search the previous word. Then M-p (and M-n) for history.

2
  • This works when search is done using swiper package as well. Thanks
    – Prasanna
    Commented Mar 5, 2018 at 8:41
  • Also works with evil mode.
    – trxgnyp1
    Commented Jun 17 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.