deadgrep
deadgrep copied to clipboard
Please add some keyboard shortcuts to the search UI
In search results, it would be super useful (for me) to have several shortcuts to change search parameters. For instance:
t: change search termy s,y w,y r: change search type to strings, words, regexpC s,C e,C i: set case to smart, sensitive, ignorec n,c b,c a: change context to none, before, afterd: change directoryf a,f t,f g: change files to all, type, glob
In other words, please let me change all search parameters without having to move the point to a button and then hitting RET! :)
Additional idea: Have a key to toggle trough the different options in the current line.
And also will be great to add some keys for adding -u and -uu arguments.
Just to help here (FYI). Following prompts the user for a new file type, then restarts the search.
(defun deadgrep-file-type ()
"Prompt the user for a new file type, then restart the search."
(interactive)
(let ((new-file-type
(deadgrep--read-file-type deadgrep--initial-filename)))
(setq deadgrep--file-type (cons 'type new-file-type)))
(rename-buffer
(deadgrep--buffer-name deadgrep--search-term default-directory) t)
(deadgrep-restart))
A use-package key binding:
:bind (:map deadgrep-mode-map
("T" . deadgrep-file-type))