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.
Announcement
Collapse
No announcement yet.
Leading Tabs to Spaces
Collapse
X
-
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
-
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
Comment