Vertico project search increase size & search history

I’m often using +vertico/project-search to search for something in a project.

When there are too many matches I always try to increase the size of the vertico minibuffer with the mouse, but the output stays at the old size as you can see here:

Is this a common problem or am I doing something wrong? I only found this upstream: Optionally shrink to match candidate list length/height · Issue #5 · minad/vertico · GitHub

Another problem I often face is that I search for something, then jump to a candidate, then notice that it was not the correct one and then start a new search, retyping the search prompt. Is there some way to continue in the old search minibuffer or to get back the old search prompt? And optionally, is there some keybinding to jump between the results?

I found one answer myself. The search prompt can be restored with C-s. But this is still not entirely what I want. Best case I could restore the old search minibuffer entirely with one key combo.

Another bit to a full answer: Resizing the vertico mini window does not work because vertico outputs a fixed number of lines. This can be changed with vertico-count. I wrote a litte elisp snippet to switch between two vertico count sizes for now:

(setq vertico-count 17)
(setq alternate-vertico-count 40)
(defun my/toggle-vertico-count ()
  (interactive)
  (let ((x vertico-count))
        (setq vertico-count alternate-vertico-count)
        (setq alternate-vertico-count x)))
(map! (:when (modulep! :completion vertico)
      :map global-map "C-S-a" #'my/toggle-vertico-count
))

The question that remains is the following:

Another problem I often face is that I search for something, then jump to a candidate, then notice that it was not the correct one and then start a new search, retyping the search prompt. Is there some way to continue in the old search minibuffer or to get back the old search prompt? And optionally, is there some keybinding to jump between the results?

1 Like

To preview a candidate without closing the search, use +vertico/embark-preview (C-SPC).

To reopen the previous search, use vertico-repeat (SPC ‘’).

To export the search results to a persistent buffer from which you can still jump to each result, use embark-export (C-; E).

For these and other tips, please read the module README with doom/help-modules (SPC h d m).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.