Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Tab size?

Name: Tabfucker 2011-06-01 9:58

I like 4... it feels good, not to big for me, not so small that it goes unnoticed.

Name: Anonymous 2011-06-03 11:58

>>31
What?
Files don't have inherent tab widths. A tab is a single character that can be interpreted in different ways. If you use it properly for indentation it doesn't matter what you set your own tab width to, text will always end up aligned nicely.

Example:


    // 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
    }                             }


It's not rocket science.

If you use tabs for alignment as well they become quite useless indeed but no one is arguing that.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List