I have a very simple thing I want to do in Emacs. I want to set it so that when I press the TAB key, it inserts two spaces. Just this. It's all I ask. I have tried doing this for a couple of years now, and there's just no way to do it. In every file type it blows up in a different way. HTML file? Random choice between getting four spaces or tabbing to previous line indent. Python file? Just four spaces and I'll ignore any setting you have. It also randomly seems to stop working depending on the phase of the moon when it was previously working.
In my .emacs:
(setq indent-tabs-mode nil) (setq tab-width 2)
This should work, right? No. No it doesn't. It seems emacs has a magical fairy "file mode" for each extension that completely overrides what I tell it. So do I have to find this magical fairy configuration and override it for each file type? What can I do to get this simple thing to work. Halp.