Emacs 28.1 新增的 fido-vertical-mode 会带来哪些变化?

Emacs 28.1 版本里面新增了 fido-vertical-mode ,是否意味着 vertico.el 可以不用了?另,目前有没有 fido-vertical-mode 相关的包推荐?

如果同时使用 orderless ,推荐用 vertico ,这两个包配合的更好一些。

我这边在 macOS 的 Emacs 29上尝试 fido-vertical-mode,感觉反应比较慢,会有卡顿,但 vertico 就很流畅。也可能是和什么配置有冲突。

orderless 的作者也是推荐用 vertico,在 fido 上有bug,这个也不是 fido 的问题

https://github.com/oantolin/orderless/issues/110

嗯。我一直在用vertico + consult + orderless + marginalia 。就是希望尽量用原生的,少装一些包。

这几个包本身就很小,没有外部依赖,安装也很方便。而且vertico + consult + orderless + marginalia 的维护者非常活跃,有问题都能很快回复,简直是秒回那种 :grinning_face_with_smiling_eyes:

1 个赞

我之前也是vertico这几个组合,这几个月来慢慢都去掉了。。28新加的completions-detailed有了marginalia的部分功能,consult之前装了了我也没咋用,感觉就是把很多内置的功能集成弄好看了。29最近对builtin的completions buffer进行了升级,比如添加了completions-sort,感觉很够我用了现在,所以也没用vertico了,开心 哈哈 贴一个我的配置

(setq completion-ignore-case t)
(setq completions-format 'one-column)
(setq completion-show-help nil)
(setq completion-show-inline-help nil)
(setq completion-auto-help 'always) ;; emacs29
(setq completions-max-height 20) ;; emacs29
(setq completions-detailed t)
(add-to-list 'display-buffer-alist
	     '("\\*Completions\\*"
	       (display-buffer-reuse-window display-buffer-in-side-window)
	       (side . bottom)
	       (slot . 0)))
(define-key completion-in-region-mode-map (kbd "M-n") #'switch-to-completions)
(define-key completion-list-mode-map (kbd "e") #'switch-to-minibuffer)
(define-key minibuffer-local-completion-map (kbd "SPC") nil)
(define-key minibuffer-mode-map (kbd "s-SPC") #'minibuffer-complete)
(define-key minibuffer-mode-map (kbd "s-n") (kbd "C-u 1 C-M-v"))
(define-key minibuffer-mode-map (kbd "s-p") (kbd "C-u 1 C-M-S-v"))
(define-key minibuffer-mode-map (kbd "C-n") #'minibuffer-next-completion) ;; emacs29
(define-key minibuffer-mode-map (kbd "C-p") #'minibuffer-previous-completion) ;; emacs29
(define-key minibuffer-mode-map (kbd "s-m") #'minibuffer-choose-completion) ;; emacs29
(define-key minibuffer-mode-map (kbd "s-j") (lambda () (interactive) (switch-to-completions) (choose-completion)))
;; live update for completions
(defun live-completions--update (&rest _)
  "Update the *Completions* buffer.
Meant to be added to `after-change-functions'."
  (when (minibufferp) ; skip if we've exited already
    (let ((while-no-input-ignore-events '(selection-request)))
      (while-no-input
        (condition-case nil
            (save-match-data
              (save-excursion
                (goto-char (point-max))
                (let ((inhibit-message t)
                      (ring-bell-function #'ignore))
                  (minibuffer-completion-help))))
          (quit (abort-recursive-edit)))))))
(defun live-completions--setup ()
  "Setup live updating for the *Completions* buffer.
Meant to be added to `minibuffer-setup-hook'."
  (unless (memq (or (bound-and-true-p current-minibuffer-command) this-command)
		'(execute-extended-command describe-command describe-symbol
					   describe-function describe-variable))
    (add-hook 'after-change-functions #'live-completions--update nil t)))
(add-hook 'minibuffer-setup-hook #'live-completions--setup)
4 个赞

completions-detailed 可以在 M-x 中显示命令绑定的按键吗,我装 marginalia 主要也就看这个有用点

我记得默认就可以啊,有一个选项控制,我忘是是哪个,默认是打开的。completions-detailed主要是C-h命令

试了下没找到翻页功能,有没有人知道,fido-vertical-mode能不能翻页啊?

(vertico的翻页是vertico-scroll-down,平时用的比较多)