2014-09-25 55 views
0

我正在设置我的Emacs以用于cpp开发。Emacs键在自动完成弹出窗口中移动

我设置了自动完成和yasnippets,它很棒。

但是,每一个的弹出一个来的时候,我已经到达鼠标点击的最低或中间的一个..

必须能够与键太多,但我在努力寻找一个。

我发现这篇文章keys-for-pop-up但我认为他是在谈论自动完成而不询问用户或显示没有弹出窗口。

+2

'Mn'和'Mp'。 – 2014-09-25 08:33:33

+0

@ abo-abo你可以给我这个来源吗,这样我就不必提问这样的问题了..? – 2014-09-25 08:45:17

+0

''define-key'只需'C-s' auto-complete.el。但我只记得这个捷径。 – 2014-09-25 08:48:11

回答

1

对于任何人读这篇文章,或上下移动的自动完成弹出:

下移:锰

向上移动:熔点

下面是自动完成的完整模式地图.el

(define-key map "\t" 'ac-expand) 
(define-key map [tab] 'ac-expand) 
(define-key map "\r" 'ac-complete) 
(define-key map [return] 'ac-complete) 
(define-key map (kbd "M-TAB") 'auto-complete) 

(define-key map "\M-n" 'ac-next) 
(define-key map "\M-p" 'ac-previous) 
(define-key map [down] 'ac-next) 
(define-key map [up] 'ac-previous) 

(define-key map [f1] 'ac-help) 
(define-key map [M-f1] 'ac-persist-help) 
(define-key map (kbd "C-?") 'ac-help) 
(define-key map (kbd "C-M-?") 'ac-persist-help) 

(define-key map [C-down] 'ac-quick-help-scroll-down) 
(define-key map [C-up] 'ac-quick-help-scroll-up) 
(define-key map "\C-\M-n" 'ac-quick-help-scroll-down) 
(define-key map "\C-\M-p" 'ac-quick-help-scroll-up)