如果你说的是:vertico 导航到某一个候选项的那个文件。
那么我是直接在 vertico 里面用 +vertico/embark-preview
:
(defun +vertico/embark-preview ()
"Previews candidate in vertico buffer, unless it's a consult command"
(interactive)
(unless (bound-and-true-p consult--preview-function)
(if (fboundp 'embark-dwim)
(save-selected-window
(let (embark-quit-after-action)
(embark-dwim)))
(user-error "Embark not installed, aborting..."))))
这个是 Doom 里面定义的函数。
这样就不关闭当前 vertico session,并定位到这个候选项的相应位置,如果是我想要的位置,再用 vertico-suspend
挂起当前的 vertico session(如果我之后还想再回到这个 vertico session 定位其他文件的话)