Last I looked at that part of the code, tabs were already being expanded. They are expanded to 4 spaces each. Since it is my experience that nobody can agree on how large a tab should be, I think that is a reasonable compromise choice.

Most of the replies seem to have missed that you are most concerned about the tabs that fall between code near the start of the line and comments that hang near the end of the line. So, expanding tabs to tab stops that appear every 4 spaces might make you a bit happier. But, unless you just happen to use such tab stops, then you likely still won't be totally happy.

So, if somebody would like something simple to implement, a user setting for tabstop choice when posting might be nice. Though, the simple way to implement that means that downloading of the code will get you spaces not tabs.

Another solution, and one that I've used for many years, is to not store tabs in one's source code. If I type a tab, my editor knows to turn it into an appropriate number of spaces for me. Then I never have to worry about how any number of web sites or other tools that my code may pass through think that tabs should be expanded.

- tye        


In reply to Re: Pretty Print (already) by tye
in thread Pretty Print by jmlynesjr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.