Skip to content

How to sort buffers? #397

Answered by minad
netjune asked this question in Q&A
Sep 12, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

If you configure the basic completion style, then switch-to-buffer behaves like this. The hidden buffers are hidden at first and only displayed if you enter a SPC as first character.

;; For testing, ensure that only `basic` is used
(setq completion-styles '(basic)
      completion-category-defaults nil
      completion-category-overrides nil)

consult-buffer behaves like this for all completion styles, and also allows you to customize the buffers which are hidden via consult-buffer-filter.

In case you want to override sorting there are also the variables vertico-sort-function and vertico-sort-override-function, which can be configured via vertico-multiform-mode as documented in the README.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@minad
Comment options

Answer selected by minad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #396 on September 12, 2023 13:52.