Announcement

Collapse
No announcement yet.

Leading Tabs to Spaces

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Leading Tabs to Spaces

    There are times that I would like to change leading tabs to spaces, but leave inline tabs as tabs. Please consider adding a "Leading Tabs to Spaces" option to the Edit \ Convert File menu. This might necessitate renaming "Tabs to Spaces" to "All Tabs to Spaces" for clarity.
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

  • #2
    We feel that "Leading Tabs to Spaces" is very obscure. Can you (Michael), or anyone else reading this thread, describe the work flow you have that would greatly benefit from this feature.
    Erik Scooter Software

    Comment


    • #3
      Absolutely!

      We have thousands of source code modules that have a mix of leading spaces and tabs due to a diverse set of editors that are used and have been used over the years. Depending on the editor being used, the leading alignment can be messed up depending on how that tool happens to be configured. In line comments, however, are separated from code using tab characters to reduce file size bloat from documentation. We want to maintain our in line tabs, but convert our leading whitespace to spaces to eliminate the confusion that occurs when code blocks (IF THEN ELSE BEGIN END logic, for example) misaligns.
      BC v4.0.7 build 19761
      ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

      Comment


      • #4
        And, since BC3 is our tool of choice for code reviews, having the ability to simply the task stated above in BC3 would be beneficial.
        BC v4.0.7 build 19761
        ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

        Comment


        • #5
          Wouldn't the embedded tabs suffer the same problems as the leading tabs? Are you saying that you just don't care if emedded tabs screw up the columns?
          Erik Scooter Software

          Comment


          • #6
            Not all inline comments are intended to be in columns...

            Not all comments intended to line up do... so to convert inline tabs to spaces would lock mis-aligned comments for all editors instead of looking right in some environments, and off in others.

            Tabs are sometimes used for clarity within code (where the tab size is small enough that they display as intended in most if not all of the editors so long as the code is correctly aligned on the left). Making changes to a variable name in one of these scenarios, for example, would be more difficult if tabs were replaced with hard-coded spaces inline...because every small change would require a realignment edit to keep the clarity.

            So yes, the alignment of inline tabs fall into a different category. What is important is that program logic be clearly represented by correct alignment of leading whitespace.
            BC v4.0.7 build 19761
            ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

            Comment

            Working...
            X