This is probably a really basic question, but something I hadn't thought about before: When editing code, how to indent? I think the way to go is simply use the tab key and then, once indented once, Emacs can work out that you are on an indented line, and when you press return, you get back to the same indentation level. And if you tab once more, you are at the second indentation level.
On my Emacs the indentation levels seem to be two characters each. In my .emacs
file, I see '(tab-width 2)
— presumably the reason I get two-character indents?
If I go to whitespace-mode
, I see there are no tab characters even though I did press tab for the indent. In my .emacs
file, I see (setq-default indent-tabs-mode nil)
.
Does indent-tabs-mode
being nil
change tabs to spaces?