I have used Vim for years now, Emacs for a couple of weeks and recently switched to Spacemacs. How do I set indentation settings either globally or the C/C++ mode? (A solution for either one is fine.) I've put the following in my dotspacemacs/user-config ()
function in my .spacemacs
file.
(setq-default indent-tabs-mode t)
(setq-default tab-width 4) ; tabs four spaces wide
(defvaralias 'c-basic-offset 'tab-width) ; Set the C/C++/Java.. mode to use this tab width
But neither is it using tabs (it's using spaces) nor is the tab-width 4 (it's 2). Is this supposed to work? If not, what's the way to set tab indentation and tab-width for either a specific mode or globally in Spacemacs? (The settings above worked for me in the init.el for vanilla Emacs.)