Emacs Trick: setting the tab length for Emacs (in c-mode)

In C mode, add the line

(setq c-basic-offset 4)

to your .emacs file. In Python, it is py-indent-offset. More generally, the tab-length variable is tab-width (if you want to set this in your .emacs file, use setq-default. When working interactively, use ESC-x set-variable.

Nov 02, 2005

emacs-tabs (/progtricks)
2005-11-02, 10:47 [edit]

  Login:   Password:   [rss] [cc] [w3] [css]

© M. Vallisneri 2012 — last modified on 2010/01/29

Tantum in modicis, quantum in maximis