Apply some isearch optimizations
From https://blog.chmouel.com/posts/emacs-isearch/: - Bind `avy-isearch` to directly jump to currently visible matchings - Use `consult-line` instead of `swiper` (this also removes a package dependency)
This commit is contained in:
parent
b59c852c53
commit
8369eab33d
14
init.el
14
init.el
@ -2246,11 +2246,6 @@ Note that this workaround is incomplete, as explained in this comment."
|
|||||||
;; functionality.
|
;; functionality.
|
||||||
(define-key ivy-minibuffer-map (kbd "S-SPC") nil)))
|
(define-key ivy-minibuffer-map (kbd "S-SPC") nil)))
|
||||||
|
|
||||||
(use-package swiper
|
|
||||||
:ensure t
|
|
||||||
:commands (swiper
|
|
||||||
swiper-from-isearch))
|
|
||||||
|
|
||||||
(use-package recentf
|
(use-package recentf
|
||||||
:commands (recentf-mode recentf-save-list)
|
:commands (recentf-mode recentf-save-list)
|
||||||
:init (setq recentf-max-saved-items 1000
|
:init (setq recentf-max-saved-items 1000
|
||||||
@ -2349,7 +2344,8 @@ eventuelly be set to nil, however)."
|
|||||||
:ensure t
|
:ensure t
|
||||||
:commands (avy-goto-char-timer
|
:commands (avy-goto-char-timer
|
||||||
avy-goto-word-or-subword-1
|
avy-goto-word-or-subword-1
|
||||||
avy-goto-line))
|
avy-goto-line
|
||||||
|
avy-isearch))
|
||||||
|
|
||||||
(use-package bm
|
(use-package bm
|
||||||
;; Taken from https://protesilaos.com/dotemacs/ and adapted slightly
|
;; Taken from https://protesilaos.com/dotemacs/ and adapted slightly
|
||||||
@ -2399,7 +2395,10 @@ eventuelly be set to nil, however)."
|
|||||||
:init (setq isearch-allow-scroll t
|
:init (setq isearch-allow-scroll t
|
||||||
isearch-lazy-count t
|
isearch-lazy-count t
|
||||||
isearch-lax-whitespace nil
|
isearch-lax-whitespace nil
|
||||||
isearch-regexp-lax-whitespace nil))
|
isearch-regexp-lax-whitespace nil)
|
||||||
|
:bind (:map isearch-mode-map
|
||||||
|
("M-i" . consult-line)
|
||||||
|
("C-j" . avy-isearch)))
|
||||||
|
|
||||||
(use-package goto-last-change
|
(use-package goto-last-change
|
||||||
:commands goto-last-change)
|
:commands goto-last-change)
|
||||||
@ -3067,7 +3066,6 @@ eventuelly be set to nil, however)."
|
|||||||
(bind-key "M-=" #'count-words)
|
(bind-key "M-=" #'count-words)
|
||||||
(bind-key "M-SPC" #'cycle-spacing) ; default since Emacs 29.1
|
(bind-key "M-SPC" #'cycle-spacing) ; default since Emacs 29.1
|
||||||
(bind-key "M-Z" #'zap-to-char)
|
(bind-key "M-Z" #'zap-to-char)
|
||||||
(bind-key "M-i" #'swiper-from-isearch isearch-mode-map)
|
|
||||||
(bind-key "M-j" #'(lambda () (interactive) (join-line -1)))
|
(bind-key "M-j" #'(lambda () (interactive) (join-line -1)))
|
||||||
(bind-key "M-z" #'zap-up-to-char)
|
(bind-key "M-z" #'zap-up-to-char)
|
||||||
(bind-key [remap fill-paragraph] #'endless/fill-or-unfill)
|
(bind-key [remap fill-paragraph] #'endless/fill-or-unfill)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user