diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2022-01-15 13:48:37 +0000 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2022-01-15 13:48:37 +0000 |
| commit | 240973f98e87431a5678188f653224013b9501a8 (patch) | |
| tree | c1113e97d89b587e4deb581c289dcdd6f6303f51 /emacs/init.el | |
| parent | 890c31f329c9f17641a6f4068aa3ae7116b60db6 (diff) | |
emacs: Add my/swiper and bind it to C-c s
If the region is active, my/swiper will call swiper with the contents of
the region as initial input. Also, When invoked with a prefix argument,
swiper-all is called instead.
Diffstat (limited to 'emacs/init.el')
| -rw-r--r-- | emacs/init.el | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/emacs/init.el b/emacs/init.el index 554d7c1..30140ce 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -89,8 +89,7 @@ (counsel-mode 1) (diminish 'counsel-mode) -(global-set-key (kbd "C-c s") #'swiper) -(global-set-key (kbd "C-c x") #'swiper-all) +(global-set-key (kbd "C-c s") #'my/swiper) (dolist (fn '(isearch-forward isearch-backward)) (advice-add fn :after #'my/isearch-region)) |
