diff --git a/modules/completion/ivy/README.org b/modules/completion/ivy/README.org index 84c1afc9d..4f2afbe7e 100644 --- a/modules/completion/ivy/README.org +++ b/modules/completion/ivy/README.org @@ -108,8 +108,8 @@ https://assets.doomemacs.org/completion/ivy/projectile.png | Keybind | Description | |----------------------+-------------------------------------| -| =SPC f /=, =SPC SPC= | Jump to file in project | -| =SPC f .=, =SPC .= | Jump to file from current directory | +| =SPC p f=, =SPC SPC= | Jump to file in project | +| =SPC f f=, =SPC .= | Jump to file from current directory | ** Project search & replace This module provides interactive text search and replace using the first search @@ -117,9 +117,9 @@ program available on your system (rg, ag, git-grep or grep). | Keybind | Description | |-----------+---------------------------------| -| =SPC / b= | Search the current buffer | -| =SPC / p= | Search project | -| =SPC / d= | Search this directory | +| =SPC s b= | Search the current buffer | +| =SPC s p= | Search project | +| =SPC s d= | Search this directory | | =SPC p t= | List all TODO/FIXMEs in project | https://assets.doomemacs.org/completion/ivy/search.png @@ -176,7 +176,7 @@ https://assets.doomemacs.org/completion/ivy/search-replace.png The =swiper= package provides an interactive buffer search powered by ivy. It can be invoked with: -+ =SPC / b= ++ =SPC s b= + ~:sw[iper] [QUERY]~ https://assets.doomemacs.org/completion/ivy/swiper.png @@ -200,24 +200,24 @@ https://assets.doomemacs.org/completion/ivy/todo.png | =SPC '= | Resume last ivy session | *** Jump to files, buffers or projects) -| Keybind | Description | -|---------------------------------+---------------------------------------| -| =SPC RET= | Find bookmark | -| =SPC f .=, =SPC .= | Browse from current directory | -| =SPC f /=, =SPC p /=, =SPC SPC= | Find file in project | -| =SPC f r= | Find recently opened file | -| =SPC p p= | Open another project | -| =SPC b b=, =SPC ,= | Switch to buffer in current workspace | -| =SPC b B=, =SPC <= | Switch to buffer | +| Keybind | Description | +|----------------------+---------------------------------------| +| =SPC RET= | Find bookmark | +| =SPC f f=, =SPC .= | Browse from current directory | +| =SPC p f=, =SPC SPC= | Find file in project | +| =SPC f r= | Find recently opened file | +| =SPC p p= | Open another project | +| =SPC b b=, =SPC ,= | Switch to buffer in current workspace | +| =SPC b B=, =SPC <= | Switch to buffer | *** Search | Keybind | Description | |-----------+------------------------------------------| -| =SPC / i= | Search for symbol in current buffer | -| =SPC / I= | Search for symbol in all similar buffers | -| =SPC / b= | Search the current buffer | -| =SPC / p= | Search project | -| =SPC / d= | Search this directory | +| =SPC s i= | Search for symbol in current buffer | +| =SPC s I= | Search for symbol in all similar buffers | +| =SPC s b= | Search the current buffer | +| =SPC s p= | Search project | +| =SPC s d= | Search this directory | | =SPC p t= | List all TODO/FIXMEs in project | * Configuration diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 662d7694a..58f9ce519 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -294,24 +294,6 @@ :desc "Find file in project" "SPC" #'projectile-find-file :desc "Jump to bookmark" "RET" #'bookmark-jump - ;;; / --- search - (:prefix-map ("/" . "search") - :desc "Search buffer" "/" #'swiper - :desc "Search buffer" "b" #'swiper - :desc "Search current directory" "d" #'+default/search-cwd - :desc "Search other directory" "D" #'+default/search-other-cwd - :desc "Locate file" "f" #'locate - :desc "Jump to symbol" "i" #'imenu - :desc "Jump to link" "l" #'ace-link - :desc "Jump list" "j" #'evil-show-jumps - :desc "Jump to mark" "m" #'evil-show-marks - :desc "Look up online" "o" #'+lookup/online - :desc "Look up online (w/ prompt)" "O" #'+lookup/online-select - :desc "Look up in local docsets" "k" #'+lookup/in-docsets - :desc "Look up in all docsets" "K" #'+lookup/in-all-docsets - :desc "Search project" "p" #'+default/search-project - :desc "Search other project" "P" #'+default/search-other-project) - ;;; TAB --- workspace (:when (featurep! :ui workspaces) (:prefix-map ("TAB" . "workspace") @@ -388,18 +370,14 @@ ;;; f --- file (:prefix-map ("f" . "file") - :desc "Find file" "." #'find-file - :desc "Find file from here" "/" - (if (featurep! :completion ivy) - #'counsel-file-jump - (λ! (doom-project-find-file default-directory))) :desc "Open project editorconfig" "c" #'editorconfig-find-current-editorconfig :desc "Copy this file" "C" #'doom/copy-this-file :desc "Find directory" "d" #'dired :desc "Delete this file" "D" #'doom/delete-this-file :desc "Find file in emacs.d" "e" #'+default/find-in-emacsd :desc "Browse emacs.d" "E" #'+default/browse-emacsd - :desc "Find file from here" "f" #'find-file + :desc "Find file" "f" #'find-file + :desc "Find file from here" "F" #'+default/find-file-under-here :desc "Locate file" "l" #'locate :desc "Move/rename file" "m" #'doom/move-this-file :desc "Find file in private config" "p" #'doom/find-file-in-private-config @@ -478,8 +456,6 @@ ;;; n --- notes (:prefix-map ("n" . "notes") - :desc "Browse notes" "." #'+default/browse-notes - :desc "Search notes" "/" #'+default/org-notes-search :desc "Search notes for symbol" "*" #'+default/search-notes-for-symbol-at-point :desc "Org agenda" "a" #'org-agenda :desc "Org capture" "c" #'org-capture @@ -490,6 +466,7 @@ :desc "Find file in notes" "n" #'+default/find-in-notes :desc "Browse notes" "N" #'+default/browse-notes :desc "Todo list" "t" #'org-todo-list + :desc "Search notes" "s" #'+default/org-notes-search :desc "View search" "v" #'org-search-view :desc "Org export to clipboard" "y" #'+org/export-to-clipboard :desc "Org export to clipboard as RTF" "Y" #'+org/export-to-clipboard-as-rich-text @@ -545,8 +522,6 @@ (:prefix-map ("p" . "project") :desc "Browse project" "." #'+default/browse-project :desc "Browse other project" ">" #'doom/browse-in-other-project - :desc "Find file in project" "/" #'projectile-find-file - :desc "Find file in other project" "?" #'doom/find-file-in-other-project :desc "Run cmd in project root" "!" #'projectile-run-shell-command-in-root :desc "Add new project" "a" #'projectile-add-known-project :desc "Switch to project buffer" "b" #'projectile-switch-to-buffer @@ -555,7 +530,7 @@ :desc "Remove known project" "d" #'projectile-remove-known-project :desc "Edit project .dir-locals" "e" #'projectile-edit-dir-locals :desc "Find file in project" "f" #'projectile-find-file - :desc "Browse project" "F" #'+default/browse-project + :desc "Find file in other project" "F" #'doom/find-file-in-other-project :desc "Configure project" "g" #'projectile-configure-project :desc "Invalidate project cache" "i" #'projectile-invalidate-cache :desc "Kill project buffers" "k" #'projectile-kill-buffers @@ -594,19 +569,23 @@ :desc "Browse remote files" "." #'ssh-deploy-browse-remote-handler :desc "Detect remote changes" ">" #'ssh-deploy-remote-changes-handler)) - ;;; s --- snippets - (:when (featurep! :editor snippets) - (:prefix-map ("s" . "snippets") - :desc "View snippet for mode" "/" #'+snippets/find-for-current-mode - :desc "View snippet (global)" "?" #'+snippets/find - :desc "Edit snippet" "c" #'+snippets/edit - :desc "View private snippet" "f" #'+snippets/find-private - :desc "Insert snippet" "i" #'yas-insert-snippet - :desc "New snippet" "n" #'+snippets/new - :desc "New snippet alias" "N" #'+snippets/new-alias - :desc "Reload snippets" "r" #'yas-reload-all - :desc "Create temporary snippet" "s" #'aya-create - :desc "Expand temporary snippet" "e" #'aya-expand)) + ;;; s --- search + (:prefix-map ("s" . "search") + :desc "Search buffer" "s" #'swiper + :desc "Search buffer" "b" #'swiper + :desc "Search current directory" "d" #'+default/search-cwd + :desc "Search other directory" "D" #'+default/search-other-cwd + :desc "Locate file" "f" #'locate + :desc "Jump to symbol" "i" #'imenu + :desc "Jump to link" "l" #'ace-link + :desc "Jump list" "j" #'evil-show-jumps + :desc "Jump to mark" "m" #'evil-show-marks + :desc "Look up online" "o" #'+lookup/online + :desc "Look up online (w/ prompt)" "O" #'+lookup/online-select + :desc "Look up in local docsets" "k" #'+lookup/in-docsets + :desc "Look up in all docsets" "K" #'+lookup/in-all-docsets + :desc "Search project" "p" #'+default/search-project + :desc "Search other project" "P" #'+default/search-other-project) ;;; t --- toggle (:prefix-map ("t" . "toggle") diff --git a/modules/config/default/autoload/default.el b/modules/config/default/autoload/default.el index a558f2ef7..08cf7b8cf 100644 --- a/modules/config/default/autoload/default.el +++ b/modules/config/default/autoload/default.el @@ -334,6 +334,14 @@ ARG is set, prompt for a known project to search from." (sit-for 1)) (server-start)) +;;;###autoload +(defun +default/find-file-under-here () + "Perform a recursive file search from the current directory." + (interactive) + (if (featurep! :completion ivy) + (call-interactively #'counsel-file-jump) + (λ! (doom-project-find-file default-directory)))) + ;;;###autoload (defun +default/insert-file-path (arg) "Insert the file name (absolute path if prefix ARG).