Emacs — Tab vs. Space

To force Emacs to insert spaces instead of tabs when you press the TAB key:

M-x set-variable indent-tabs-mode nil

Or in your .emacs file:

(setq-default indent-tabs-mode nil)