From 09add70efdbf99e941401783bb901b518a8f6669 Mon Sep 17 00:00:00 2001 From: "Itai Y. Efrat" Date: Tue, 11 Jan 2022 15:48:19 +0200 Subject: [PATCH] feat(vertico): add embark-collect-snapshot binding The C-c C-s binding mirrors the export and writable export bindings. embark-export is used for type specific exports (such as buffers to an ibuffer buffer), not for verbatim exports. This is most noticeable if you want to export a variable list, which gets you to an apropos buffer. if you just want a list of things to keep around, embark-collect-snapshot is the tool for the job, but having it be only on C-; S makes it harder to reach and less visible. C-c C-s is a nice visible thing to have around. --- modules/completion/vertico/README.org | 19 ++++++++++--------- modules/completion/vertico/config.el | 1 + 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/completion/vertico/README.org b/modules/completion/vertico/README.org index 31fa9f611..f472b982d 100644 --- a/modules/completion/vertico/README.org +++ b/modules/completion/vertico/README.org @@ -79,15 +79,16 @@ Doom-specific additions: When in an active Vertico completion session, the following doom added keybindings are available: -| Keybind | Description | -|-----------------------+----------------------------------------------------| -| =C-k= | (evil) Go to previous candidate | -| =C-j= | (evil) Go to next candidate | -| =C-M-k= | (evil) Go to previous group | -| =C-M-j= | (evil) Go to next group | -| =C-;= or = a= | Open an ~embark-act~ menu to chose a useful action | -| =C-c C-;= | export the current candidate list to a buffer | -| =C-SPC= | Preview the current candidate | +| Keybind | Description | +|-----------------------+-------------------------------------------------------------------------------| +| =C-k= | (evil) Go to previous candidate | +| =C-j= | (evil) Go to next candidate | +| =C-M-k= | (evil) Go to previous group | +| =C-M-j= | (evil) Go to next group | +| =C-;= or = a= | Open an ~embark-act~ menu to chose a useful action | +| =C-c C-;= | ~embark-export~ the current candidate list (export to a type-specific buffer) | +| =C-c C-s= | ~embark-collect-snapsnot~ the current candidate list (collect verbatim) | +| =C-SPC= | Preview the current candidate | ~embark-act~ will prompt you with a =which-key= menu with useful commands on the selected candidate or candidate list, depending on the completion category. Note diff --git a/modules/completion/vertico/config.el b/modules/completion/vertico/config.el index 378c3a43e..a3a0b0708 100644 --- a/modules/completion/vertico/config.el +++ b/modules/completion/vertico/config.el @@ -172,6 +172,7 @@ orderless." (:map minibuffer-local-map "C-;" #'embark-act "C-c C-;" #'embark-export + "C-c C-s" #'embark-collect-snapshot :desc "Export to writable buffer" "C-c C-e" #'+vertico/embark-export-write) (:leader :desc "Actions" "a" #'embark-act)) ; to be moved to :config default if accepted