Re: [Evolution] tab settings



a tab is expanded to 8 spaces

No it isn't. It is expanded with enough whitespace to reach the next
column that is a multiple of eight columns. A tab width of eight
columns is the historical norm and the de facto standard in most of
the open source world. Unfortunately, for some weird reason, in the
Windows world a tab width of four is more common.

Whether there actually are any "spaces" involved, or just positioning
of text on a freely addressable surface, is another question... And of
course, I assume a fixed-width "console" or "typewriter" style font is
used.

when pasting tab-indented source code
my screen is often too small and I would rather have a smaller tab-width
(2 or 4).

You mean code somebody else has written?

Surely if you have some source code or whatever text with a specific
intended relative indentation and alignment of text elements on
different lines that contains hardcoded TAB characters, that was
created using a tab width of eight columns, displaying the text with
some other tab width will make all the indentation and alignment
appear broken.

Only in the special case of *all* lines being indented with some
amount of leading TABs *only* (i.e. no spaces intermixed with the
TABs), and no TABs used in the middle of the lines, would it work to
use arbitrary tab widths. But such source code is quite rare to find.

In fact, many open source projects ban TAB characters in the source
code, exactly because various people are using environments with
varying tab widths.

--tml



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]