Emacs smart tabs - indent with tabs, align with spaces!
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Add byte-compiled files to ignore list Feb 5, 2017
readme.md Describe project Sep 19, 2011
smart-tabs-mode.el Fixed the define-minor-mode macro so the body is called properly Jun 28, 2016


Smart Tabs

Indent with tabs; align with spaces “Tabs.” “Spaces.” “Both.”

See EmacsWiki › SmartTabs for details about the idea this package enables.


// Tab size: 4                // Tab size: 2
if(foo) {                     if(foo) {
--->char quux[4] = {0, 1,     ->char quux[4] = {0, 1,     // "0" and "2"
--->................2, 3};    ->................2, 3};    // remain aligned
}                             }

Tabs are only used at the beginning of lines. Everything else, like ASCII art and tables, should be formatted with spaces.

Tabs are only used for expressing the indentation level. One tab per “block” – any remaining whitespace is spaces only.