I have been using Emacs for a while and it has been one of my favorite editors of all time, even more so than Vim. However, I've had a problem in regards to setting tabs and spaces.
Whenever I try to program in C or C++, whenever it auto-indents, it uses spaces instead of tabs. However, I would prefer it if they were hard tabs that appeared visually as 4 spaces.
Right now in my ~/.emacs.d/init.el, I have this:
(setq tab-width 4) (setq c-default-style "linux") (setq-default c-basic-offset 4 tab-width 4 indent-tabs-mode t)
I know that there isn't anything else conflicting in the init.el that could lead to it being overridden. So far nothing that I've tried online as of yet has been able to fix it, including searching the EmacsWiki, Stack Overflow, and Emacs Stack Exchange.
I'm using GNU Emacs 26.3 on Ubuntu GNU/Linux 20.04.