refactor!(vertico): evil minibuffer keybindings
BREAKING CHANGE: remove +vertico/(next|previous)-candidate-preview. BREAKING CHANGE: Move vertico-(next|previous)-group to C-M-j/k now that C-S-j/k now default back to scrolling up and down pages. Update docs to reflect these changes.
This commit is contained in:
parent
6022579231
commit
a612220369
4 changed files with 9 additions and 27 deletions
|
@ -85,11 +85,11 @@ keybindings are available:
|
||||||
| =C-n= | Go to next candidate |
|
| =C-n= | Go to next candidate |
|
||||||
| =C-k= | (evil) Go to previous candidate |
|
| =C-k= | (evil) Go to previous candidate |
|
||||||
| =C-j= | (evil) Go to next 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 =<leader> a= | Open an ~embark-act~ menu to chose a useful action |
|
| =C-;= or =<leader> a= | Open an ~embark-act~ menu to chose a useful action |
|
||||||
| =C-c C-;= | export the current candidate list to a buffer |
|
| =C-c C-;= | export the current candidate list to a buffer |
|
||||||
| =C-SPC= | Preview the current candidate |
|
| =C-SPC= | Preview the current candidate |
|
||||||
| =C-M-k= | (evil) Go to previous candidate and preview. |
|
|
||||||
| =C-M-j= | (evil) Go to next candidate and preview. |
|
|
||||||
|
|
||||||
~embark-act~ will prompt you with a =which-key= menu with useful commands on the
|
~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
|
selected candidate or candidate list, depending on the completion category. Note
|
||||||
|
@ -274,9 +274,9 @@ override the module's modifications, do:
|
||||||
;...
|
;...
|
||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
If you are changing the preview keys (set to =C-SPC=, =C-M-j=, and =C-M-k=),
|
If you are changing the preview key (set to =C-SPC=), remember to change the
|
||||||
remember to change their bindings on ~vertico-map~ as well, as the bindings
|
binding on ~vertico-map~ as well, as the binding there gets previews to work to
|
||||||
there get previews to work to an extent on non-consult commands as well.
|
an extent on non-consult commands as well.
|
||||||
** Marginalia
|
** Marginalia
|
||||||
You can add more Marginalia annotation levels and change the existing ones by
|
You can add more Marginalia annotation levels and change the existing ones by
|
||||||
editing ~marginalia-annotator-registry~
|
editing ~marginalia-annotator-registry~
|
||||||
|
|
|
@ -134,20 +134,6 @@ Supports exporting consult-grep to wgrep, file to wdeired, and consult-location
|
||||||
(let ((embark-quit-after-action nil))
|
(let ((embark-quit-after-action nil))
|
||||||
(embark-dwim)))))
|
(embark-dwim)))))
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun +vertico/next-candidate-preview (&optional n)
|
|
||||||
"Go forward N candidates and preivew"
|
|
||||||
(interactive)
|
|
||||||
(vertico-next (or n 1))
|
|
||||||
(+vertico/embark-preview))
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun +vertico/previous-candidate-preview (&optional n)
|
|
||||||
"Go backward N candidates and preivew"
|
|
||||||
(interactive)
|
|
||||||
(vertico-previous (or n 1))
|
|
||||||
(+vertico/embark-preview))
|
|
||||||
|
|
||||||
(defvar +vertico/find-file-in--history nil)
|
(defvar +vertico/find-file-in--history nil)
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +vertico/find-file-in (&optional dir initial)
|
(defun +vertico/find-file-in (&optional dir initial)
|
||||||
|
|
|
@ -117,12 +117,10 @@ overrides `completion-styles' during company completion sessions.")
|
||||||
+default/search-cwd +default/search-other-cwd
|
+default/search-cwd +default/search-other-cwd
|
||||||
+default/search-notes-for-symbol-at-point
|
+default/search-notes-for-symbol-at-point
|
||||||
consult--source-file consult--source-project-file consult--source-bookmark
|
consult--source-file consult--source-project-file consult--source-bookmark
|
||||||
:preview-key (list (kbd "C-SPC") (kbd "C-M-j") (kbd "C-M-k")))
|
:preview-key (kbd "C-SPC"))
|
||||||
(consult-customize
|
(consult-customize
|
||||||
consult-theme
|
consult-theme
|
||||||
:preview-key
|
:preview-key (list (kbd "C-SPC") :debounce 0.5 'any))
|
||||||
(list (kbd "C-SPC") (kbd "C-M-j") (kbd "C-M-k")
|
|
||||||
:debounce 0.5 'any))
|
|
||||||
(after! org
|
(after! org
|
||||||
(defvar +vertico--consult-org-source
|
(defvar +vertico--consult-org-source
|
||||||
`(:name "Org"
|
`(:name "Org"
|
||||||
|
|
|
@ -209,11 +209,9 @@
|
||||||
"M-RET" #'vertico-exit-input
|
"M-RET" #'vertico-exit-input
|
||||||
"C-SPC" #'+vertico/embark-preview
|
"C-SPC" #'+vertico/embark-preview
|
||||||
"C-j" #'vertico-next
|
"C-j" #'vertico-next
|
||||||
"C-M-j" #'+vertico/next-candidate-preview
|
"C-M-j" #'vertico-next-group
|
||||||
"C-S-j" #'vertico-next-group
|
|
||||||
"C-k" #'vertico-previous
|
"C-k" #'vertico-previous
|
||||||
"C-M-k" #'+vertico/previous-candidate-preview
|
"C-M-k" #'vertico-previous-group)))
|
||||||
"C-S-k" #'vertico-previous-group)))
|
|
||||||
|
|
||||||
|
|
||||||
;;; :ui
|
;;; :ui
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue