Alex
Alex

Reputation: 1254

Non-arrow navigation of auto-complete menu in Emacs?

When the auto-complete menu pops up in Emacs, what key do I use to navigate up and down the menu besides the up and down arrows? I tried C-n and C-p but that makes the menu disappear and move my cursor up and down the text area instead.

Upvotes: 5

Views: 520

Answers (2)

smonff
smonff

Reputation: 3499

An answer to this question with the C-n and C-p keybindings could be:

; Cycle candidates with C-n and C-p
(setq ac-use-menu-map t)

Setting this variable (that comes from auto-complete.el) to true will remap the keybindings. auto-complete.el says a special keymap ac-menu-map on completing menu will be used. This is where the binding is made.

Upvotes: 0

Luke Girvin
Luke Girvin

Reputation: 13422

You can also use M-p and M-n to select the previous and next candidates respectively as described in the Summary section of the User Manual.

Upvotes: 4

Related Questions