This question already has an answer here:
I'm trying to bind tab to either a tab or multiple spaces in Latex/ESS-noweb mode but I can't get it to work. I tried
(local-set-key (kbd "<tab>") 'self-insert-command) which didn't work, and then
(local-set-key (kbd "<tab>") (lambda() (insert " "))) which also didn't work.