In Emacs, how do I select the completion list with the keyboard?

六月ゝ 毕业季﹏ 提交于 2019-12-01 05:45:48

You can use M-v (documented here) which switches to the completion buffer and puts the cursor on the first completion:

Typing M-v, while in the minibuffer, selects the window showing the completion list (switch-to-completions). This paves the way for using the commands below. <PageUp> or <prior> does the same. You can also select the window in other ways...

EDIT: It looks like based on your edit to the original question that what you're asking for is a way to switch to the completions buffer more globally. There is a function switch-to-completions that selects the completions list - you might consider binding that function to a key of your choosing, e.g.:

(define-key global-map (kbd "C-x t") 'switch-to-completions)

For example, such a binding allows me to switch to completions from "Shell command: " invoked by M-!, and places the cursor on the first possible completion.

You can use C-xo twice, or use M--C-xo, which switches to the previous buffer instead of the next one.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!