From 781427c182fb32435c7f0e11a4b4465d29ce826a Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Sun, 27 Feb 2022 14:13:45 +0100 Subject: [PATCH] Install and configure deadgrep --- README.org | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index f5d5762..f6bea84 100644 --- a/README.org +++ b/README.org @@ -204,6 +204,7 @@ the ~custom-file~ as [[info:emacs#Saving Customizations][saving customizations ( company ; complete anything company-anaconda ; complete anything in anaconda-mode consult ; consult completing-read + deadgrep ; use ripgrep from Emacs eglot ; Emacs polyGLOT LSP client electric-operator ; automatic spacing around operators elfeed ; web feed reader @@ -848,6 +849,7 @@ Listing [[lst:configure-consult]] configures =consult=. | =consult-register= | {{{kbd(C-x r x)}}} | =ctl-x-keymap= | | =consult-yank-pop= | {{{kbd(M-y)}}} | =global-map= | |-------------------------------+---------------------+------------------------| +| =deadgrep= | {{{kbd(M-s d)}}} | =search-map= | | =elfeed= | {{{kbd(C-x w)}}} | =global-map= | | =embark-act= | {{{kbd(C-\,)}}} | =global-map= | | =embark-bindings= | {{{kbd(C-h B)}}} | =global-map= | @@ -902,8 +904,7 @@ Listing [[lst:configure-consult]] configures =consult=. (global-set-key (kbd " a") #'consult-apropos) ;; Tweak functions (advice-add 'completing-read-multiple - :override #'consult-completing-read-multiple) - (fset 'multi-occur #'consult-multi-occur))) + :override #'consult-completing-read-multiple))) #+end_src ** [[https://company-mode.github.io/][Company: a modular complete anything framework for Emacs]] @@ -972,12 +973,34 @@ previous input in the minibuffer. Listing (define-key minibuffer-local-map (kbd "C-") #'minibuffer-complete-history) #+end_src +* [[info:emacs#Search][Search and replace (info)]] +:PROPERTIES: +:CUSTOM_ID: sec:search-replace +:END: + +** [[https://github.com/Wilfred/deadgrep#readme][Deadgrep]] +:PROPERTIES: +:CUSTOM_ID: sec:deadgrep +:END: + +[[https://github.com/Wilfred/deadgrep#readme][Deadgrep]] uses [[https://github.com/BurntSushi/ripgrep#readme][ripgrep]] for superfast text searching in the default directory or +the current [[https://en.wikipedia.org/wiki/Version_control][VCS]] directory tree. Listing [[lst:configure-deadgrep]] binds the +=deadgrep= function to {{{kbd(M-s d)}}}. + +#+caption[Configure =deadgrep=]: +#+caption: Configure =deadgrep=. +#+name: lst:configure-deadgrep +#+begin_src emacs-lisp + (when (autoload 'deadgrep "deadgrep" nil t) + (define-key search-map (kbd "d") #'deadgrep)) +#+end_src + * Reading :PROPERTIES: :CUSTOM_ID: sec:reading :END: -** Reading [[https://en.wikipedia.org/wiki/DjVu][DjVu]] files +** Reading [[https://en.wikipedia.org/wiki/DjVu][DjVu]] files :PROPERTIES: :CUSTOM_ID: sec:reading-djvu-files :END: