From 9c48f081ee49b4fa14737ae98f624cb5dd498f51 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 13 Sep 2022 20:54:29 +0100 Subject: (Emacs)~rg binding "sr"->"sR" I use counsel-rg usually as it provides instant results. At the point where I'll need a compilation-like buffer of results I'll just use one of the *grep functions, which work regardless of ripgrep being installed (essentially just learn one tool, well, rather than multiple tools, badly.) --- Emacs/.config/emacs/config.org | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 807f6bb..161e4cd 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -1296,11 +1296,9 @@ most repositories nowadays. #+begin_src emacs-lisp (use-package rg :after grep - :commands (rg +rg/search-in-new-frame) :general (leader - "sr" #'rg - "sR" #'+rg/search-in-new-frame) + "sR" #'rg) (:keymaps 'rg-mode-map "]]" #'rg-next-file "[[" #'rg-prev-file @@ -1312,13 +1310,8 @@ most repositories nowadays. rg-show-header t rg-custom-type-aliases nil rg-default-alias-fallback "all" - rg-buffer-name "*ripgrep*") - :config - (defun +rg/search-in-new-frame () - (interactive) - (let ((frame (make-frame))) - (select-frame frame) - (call-interactively #'rg)))) + rg-buffer-name "*ripgrep*")) +#+end_src #+end_src * Applications ** Dashboard -- cgit v1.2.3-13-gbd6f