redguardtoo / emacs.d

Fast and robust Emacs setup.
http://blog.binchen.org
GNU General Public License v3.0
2.39k stars 619 forks source link

Disable using number keys as shortcus for company candidates #1027

Closed Stumble closed 1 year ago

Stumble commented 1 year ago

Hi Bin, I am trying to find out where could I disable using number-keys when selecting auto complete candidates.

Example situation: When I want to type ‘past24Hour’, it becomes very tricky: after typing 'past', the selection menu showed up and when I press '2', it just auto complete to 'past7Hour', instead of allowing me to just type 'past24Hour'.

image

I remember the behavior used to be using 'M-number' keys as bindings, which is good, any idea of how to get back to it?

suliveevil commented 1 year ago

Seems it matches the comment string string (Variable) 2 when there are few candidates.

It may be a feature of auto-completion when candidate less than certain numbers

BlacAmDK commented 1 year ago

https://github.com/redguardtoo/emacs.d#code-auto-completion

https://github.com/redguardtoo/emacs.d/blob/1c69820c658fb1ac91d4f3860fd64926f847acb7/lisp/init-company.el#L7-L8

Stumble commented 1 year ago

https://github.com/redguardtoo/emacs.d#code-auto-completion

https://github.com/redguardtoo/emacs.d/blob/1c69820c658fb1ac91d4f3860fd64926f847acb7/lisp/init-company.el#L7-L8

Oh Thanks! Can't believe I missed this line.