Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
Tweaks ctrlf config based on raxod502 feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
overvale committed Feb 19, 2021
1 parent 352cc5e commit 7f4566b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions emacs/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -927,20 +927,13 @@ This simply removes the hooked added by the function `use-embark-completions'."

(use-package ctrlf
:init
(defun oht-ctrlf-push-region ()
"Push the region to ctrlf's `last-input' variable."
(interactive)
(if (use-region-p)
(setq ctrlf--last-input (buffer-substring (region-beginning) (region-end)))
(error "No active region")))
(defun oht-ctrlf-forward-fuzzy ()
"Call `ctrlf-forward-fuzzy' with last-input."
(interactive)
(ctrlf-forward 'fuzzy nil ctrlf--last-input)
(ctrlf-forward 'fuzzy nil (car ctrlf-search-history))
)
:bind
;; ("C-M-s" . oht-ctrlf-push-region)
("C-s" . ctrlf-forward-fuzzy)
("C-s" . oht-ctrlf-forward-fuzzy)
("C-r" . ctrlf-backward-fuzzy)
:config
(setq ctrlf-go-to-end-of-match nil)
Expand Down

0 comments on commit 7f4566b

Please sign in to comment.