Update C-s experience

C-s now starts swiper, while C-r starts isearch regex forward/backward based on prefix.
This commit is contained in:
Gergely Polonkai 2021-03-09 17:54:32 +01:00
parent e6dcae995b
commit 5e1bd7ce39
No known key found for this signature in database
GPG Key ID: 2D2885533B869ED4

View File

@ -3584,6 +3584,16 @@ With the new Transient package it will be easier. I just dont know how to us
** The actual key bindings
#+begin_src emacs-lisp
(defun gpolonkai/isearch-regexp (prefix)
"Call `isearch-forward-regex'. If PREFIX is non-nil, call `isearch-backward-regex' instead."
(interactive "P")
(call-interactively
(if prefix
'isearch-backward-regexp
'isearch-forward-regexp)))
#+end_src
#+BEGIN_SRC emacs-lisp
(bind-keys
:map global-map
@ -3602,8 +3612,8 @@ With the new Transient package it will be easier. I just dont know how to us
("C-e" . gpolonkai/move-to-end-of-line)
("M-q" . sachachua/fill-or-unfill-paragraph)
("C-c r" . round-number-at-point-to-decimals)
("C-s" . isearch-forward-regexp)
("C-r" . isearch-backward-regexp)
("C-s" . swiper)
("C-r" . gpolonkai/isearch-regexp)
("C-M-s" . isearch-forward)
("C-M-r" . isearch-backward)
("C-~" . toggle-char-case)