refactor!(vertico): crm keybindings behaviour
BREAKING CHANGE: This commit changes the behaviour of the TAB and RET keys in a consult-completing read multiple session, in order to make them more intuitive. The behaviour is now: - TAB: (unchanged) always select or deselect the current candidate, and if the candidate is selected, move the index to the next one (this allows for pressing TAB repeatedly to select multiple subsequent candidates). - RET: If no candidates have been selected, select the current candidate and exit the completion session. If some have been selected, disregard the current candidate and exit. - S-TAB: (new) like TAB, but the keeps the input.
This commit is contained in:
parent
5274f1ad4d
commit
4f34635e04
2 changed files with 30 additions and 9 deletions
|
@ -146,7 +146,8 @@ orderless."
|
|||
:items ,(lambda () (mapcar #'buffer-name (org-buffer-list)))))
|
||||
(add-to-list 'consult-buffer-sources '+vertico--consult-org-source 'append))
|
||||
(map! :map consult-crm-map
|
||||
:desc "Select candidate" "TAB" #'+vertico/crm-select
|
||||
:desc "Select candidate" [tab] #'+vertico/crm-select
|
||||
:desc "Select candidate and keep input" [backtab] #'+vertico/crm-select-keep-input
|
||||
:desc "Enter candidates" "RET" #'+vertico/crm-exit))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue