How to disable yasnippet expansion on tab key (so it does not interfere with company)

I am trying to setup tab for company:

(define-key company-mode-map [tab]
  #'company-complete-common
)

Works often but sometimes ysnippets interfers in stupid siuations:

x.hello_if<tab>
# becomes
x.hello_if cond:
pass

So I want to put yasnippet on a different key, but first I want to disable tab for it:

(define-key yas-minor-mode-map (kbd "<tab>") nil)
(define-key yas-minor-mode-map (kbd "TAB") nil)

But that does not work.

Anyone knows why? Thanks!

System information


Loading data dump...

This topic was automatically closed after 360 days. New replies are no longer allowed.