Replies: 1 comment 3 replies
-
Hi! This sounds like a good idea. One can use the (lambda ()
(consult--buffer-query :sort 'window-local ;; Note that window-local does not yet exist.
:as #'consult--buffer-pair)) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I run consult-buffer, the first candidates displayed are the previous buffers I have visited, from most to least recent (excluding buffers that are visible in other windows). Is it possible to configure this ordering to behave locally to each window?
To be more specific, say I have a vertical window split, and I am looking at buffer A on the left, and B on the right. Suppose I switch to buffer C on the left split, and then jump to the right with other-window and switch to buffer D. If I then jump back to the left and run consult-buffer, the first entry will be B, whereas I would like it to be A. This is useful because often one might use a specific window split for a specific type of buffer, and it is convenient to quickly cycle through the recently-visited buffers specifically in that window split. This is also how VScode buffer-switching works.
I don't understand the consult internals particularly well, but as far as I could tell this is not something that is directly available in the configuration options. Perhaps it would be a matter of adding an additional
consult--buffer-sort
function that uses some sort ofwindow-parameter
?Beta Was this translation helpful? Give feedback.
All reactions