2

I'm trying to get several plugins all playing nicely: yasnippet, company-mode and ENSIME.

I'm aware of How to make yasnippet and company work nicer? but I was thinking about another, simpler, approach: can I just disable company-mode's TAB altogether?

I use RET to expand completions and I very rarely want to use TAB to select the maximum common matching expression.

3

Use C-h M-k (describe-keymap) from help-fns+.el to find out what command company-mode-map (or whatever the mode's keymap is called) binds to TAB.

Then do (define-key company-mode-map THE-COMMAND nil), where THE-COMMAND is that command, to unbind it. (Or use another key sequence in place of nil, to bind it to a different key.)


UPDATE by @fommil:

You'll find that the following will then unbind TAB

(define-key company-active-map 'company-complete-common nil)
  • (define-key company-active-map 'company-complete-common nil) :smile: – fommil Aug 11 '15 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.