www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Change Tab Sizes in Forum Posts

reply "tcak" <tcak gmail.com> writes:
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/
Oct 24 2014
next sibling parent reply "Szymon Gatner" <noemail gmail.com> writes:
On Friday, 24 October 2014 at 07:29:24 UTC, tcak wrote:

 if the CSS is to be updated for let's say 4 spaces for a tab,
You surely meant 2 spaces ;)
Oct 24 2014
parent "Kagamin" <spam here.lot> writes:
Yes, the forum wastes so much horizontal space, the tab should be 
2 spaces.
Oct 24 2014
prev sibling next sibling parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
On Friday, 24 October 2014 at 07:29:24 UTC, tcak wrote:
 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 think the column limit for word wrapping should be increased to at least 80
Oct 24 2014
parent reply "Brad Anderson" <eco gnuk.net> writes:
On Friday, 24 October 2014 at 09:17:52 UTC, John Colvin wrote:
 I think the column limit for word wrapping should be increased 
 to at least 80
The problem with that is that you'll get terrible line wrapping of any quoted parts after the first reply. Newsreaders and email clients wrap before 80 to give some room for quoted region prefixes. I only know this because I asked Vladimir in IRC why the forum wraps at 65ish and some people ended up explaining this to me. I don't like it still but I understand why it is this way now. I believe there is an unfinished pull request for DFeed to re-newline quoted regions to avoid this problem.
Oct 24 2014
parent Marco Leise <Marco.Leise gmx.de> writes:
Am Fri, 24 Oct 2014 16:54:07 +0000
schrieb "Brad Anderson" <eco gnuk.net>:

 On Friday, 24 October 2014 at 09:17:52 UTC, John Colvin wrote:
 I think the column limit for word wrapping should be increased=20
 to at least 80
=20 The problem with that is that you'll get terrible line wrapping=20 of any quoted parts after the first reply. Newsreaders and email=20 clients wrap before 80 to give some room for quoted region=20 prefixes. I only know this because I asked Vladimir in IRC why=20 the forum wraps at 65ish and some people ended up explaining this=20 to me. I don't like it still but I understand why it is this way=20 now. =20 I believe there is an unfinished pull request for DFeed to=20 re-newline quoted regions to avoid this problem.
I'm using a GUI news reader and a few years ago I decided to post without hard line wrapping. It went well until someone notified me that my text is somehow very wide and hard to read. It seems not every client is readily set up for automatic line-wrapping =C3=A0 la word processors, editors, web browsers. The 80s are showing through... --=20 Marco
Oct 24 2014
prev sibling parent reply Marco Leise <Marco.Leise gmx.de> writes:
Am Fri, 24 Oct 2014 07:29:23 +0000
schrieb "tcak" <tcak 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
Oct 24 2014
parent "tcak" <tcak gmail.com> writes:
Now, before this entry gets hidden in old pages, how can we take 
next step?

As far as I see, two problems are (at least current),

1. Tab Width
2. Width of messaging area

I checked the width information of this "Message" textarea and 
"Subject" input.

Thing is that they do not use CSS for width, and "size" and 
"cols" attributes are used. Another thing is that even both 
"size" and "cols" are set to 80 both, they are not same width at 
all.

Normally, these can be fixed in a very short time, though I am 
not allowed for that I guess. So, who should know about this, and 
take next step?
Oct 24 2014