Skip to content

What's the best way to toggle buffer + grid view with vertico-multiform? #528

Answered by deejayem
deejayem asked this question in Q&A
Discussion options

You must be logged in to vote

It looks like the problem was that I misunderstood how vertico-multiform--stack is being used, and I needed to use setcar instead of push. The following seems to do a better job, so I'll add it to the wiki later:

  (defun vertico-multiform-buffer-grid ()
    "Toggle displaying Vertico as a grid in a large window (like a regular buffer)."
    (interactive)
    (if (equal '(vertico-buffer-mode vertico-grid-mode) (car vertico-multiform--stack))
        (vertico-multiform-vertical)
      (setcar vertico-multiform--stack '(vertico-buffer-mode vertico-grid-mode))
      (vertico-multiform--toggle 1)))

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@deejayem
Comment options

@minad
Comment options

@deejayem
Comment options

Answer selected by deejayem
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