Change Tab Sizes in Forum Posts
Marco Leise via Digitalmars-d
digitalmars-d at puremagic.com
Fri Oct 24 04:50:48 PDT 2014
Am Fri, 24 Oct 2014 07:29:23 +0000
schrieb "tcak" <tcak at gmail.com>:
> Most of us print out codes in posts, especially D codes. I use
> tabs
> instead of spaces in my code editor, and I directly copy codes
> from there into a post. Problem is that when a line is too long,
> it
> becomes multiline mostly due to the very narrow width of pages
> (Forum
> takes half of my screen only.)
>
> One of the biggest reason in this problem is the width of tabs.
> They
> are just unbelievably wide.
>
> CSS has "tab-size" keyword that allows to change to with of tabs.
> So,
> if the CSS is to be updated for let's say 4 spaces for a tab, that
> will make codes much more good looking I think.
>
> Example:
> pre{
> tab-size: 4
> }
>
> Links:
> https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size
> http://css-tricks.com/almanac/properties/t/tab-size/
I know it is not straight forward, but all browsers I've come
across support a user CSS file. That way we can all have our
tab sizes of 2, 3 or 4.
This is mine:
* { -moz-tab-size: 3; -o-tab-size: 3; tab-size: 3; }
--
Marco
More information about the Digitalmars-d
mailing list