I would like to have an .emacs setting so that tabs are always formed by consecutive spaces. Preferably in each possible mode. In other editors it never seemed a problem, but in .emacs I'm a bit stuck with the tabs I'm afraid.
+9
A:
add this in your .emacs:
(setq-default indent-tabs-mode nil)
or you can define a before-save-hook that eliminate hard tabs
dfa
2009-06-18 14:13:48
I don't know who voted you down, it works fine for me, at least in textmode, other modes I haven't tried. Tx.
Peter
2009-06-18 14:21:58
down votes without explanation are pointless :)
dfa
2009-06-18 14:41:01
+4
A:
Also of use, M-x untabify
, which will convert all the tabs into spaces in the current region. You can use this to get rid of the existing tabs in files you've edited before you had the indent-tabs-mode
set properly.
C-x h (M-x mark-whole-buffer)
M-x untabify
Trey Jackson
2009-06-18 15:00:46