Add SPC / D and SPC / P keybinds #1531

For searching from another directory/project (prompted)
This commit is contained in:
Henrik Lissner 2019-07-02 14:13:30 +02:00
parent 65efbc4204
commit 9ffb740b0f
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 19 additions and 5 deletions

View file

@ -220,7 +220,7 @@ possible, or just one char if that's not possible."
((delete-char (- n) killflag))))
;;;###autoload
(defun +default/search-from-cwd (&optional arg)
(defun +default/search-cwd (&optional arg)
"Conduct a text search in files under the current folder.
If prefix ARG is set, prompt for a directory to search from."
(interactive "P")
@ -231,7 +231,13 @@ If prefix ARG is set, prompt for a directory to search from."
(call-interactively
(cond ((featurep! :completion ivy) #'+ivy/project-search-from-cwd)
((featurep! :completion helm) #'+helm/project-search-from-cwd)
(#'projectile-grep)))))
(#'rgrep)))))
;;;###autoload
(defun +default/search-other-cwd ()
"Conduct a text search in another directory."
(interactive)
(+default/search-cwd 'other))
;;;###autoload
(defun +default/search-project (&optional arg)
@ -248,7 +254,13 @@ If prefix ARG is set, prompt for a known project to search from."
(call-interactively
(cond ((featurep! :completion ivy) #'+ivy/project-search)
((featurep! :completion helm) #'+helm/project-search)
(#'rgrep)))))
(#'projectile-grep)))))
;;;###autoload
(defun +default/search-other-project ()
"Conduct a text search in a known project."
(interactive)
(+default/search-project 'other))
;;;###autoload
(defun +default/search-project-for-symbol-at-point (&optional arg symbol)