Aligning REMARKS in Editor

techElder

Well-known member
The programming editor would be so much more fun if it had a function that would align remarks for a highlighted area.

Call me anal if you want, but I spend more time than I care to admit just retabbing remarks on lines that are edited.
 

BCJKiwi

Senior Member
Agree, adjustable (as in different width) tabs would be great. One option (takes a lot of space) is to place remarks on their own (next) line.
 

techElder

Well-known member
Adjust your tab spacing in the Options/Editor area.

It seems to me that REMARKS are already detected because they are colored. So, just create a function to act on only the REMARKS and align the left side to some point indexed by the tab spacing specified.
 

techElder

Well-known member
This must not be much of a problem for most folks.

Maybe if the REMARKS ALIGNMENT FUNCTION could align the program REMARKS with TABS to a certain number of characters, but use the current TAB spacing to get it close.

That would be perfect.
 
Last edited:

Technical

Technical Support
Staff member
You can already adjust the tab size.

We think what you are asking for is actually a 'comments automatically start at column X' feature, which is not really anything to do with tabs. This is not planned.
 

BCJKiwi

Senior Member
Yes tabs are adjustable but they are all the same width.

If individual tabs could be set to different widths then problem solved.
 

inglewoodpete

Senior Member
As an aside on this one but relating to tabs; I'm in the process of migrating a number of programs from the X1 platform to X2.

The output from the X2 converter corrupts the tabs associated with all comments. It is quite a large task to realign all of the comments for a 4000+ byte program!
 

Technical

Technical Support
Staff member
The number of tabs characters won't change, but as the symbols may get longer (e.g. pin0 becoming pinC.0) then the number of tabs required for alignment may change. Unfortunately there is no easy way around this.
 

techElder

Well-known member
There sure is a way around the problem ... a TAB alignment function.

I see this as more of a wordprocessing type of action, but that's what we're doing when we write code, isn't it?

Highlight the area of interest
Activate the TAB ALIGN function
All REMARKS highlighted immediately align to the leftmost one
Use the TAB key to move them all to the right
Use the SHIFT-TAB keys to move them all to the left
Damn I wish I still had all my programming stuff available, but you guys do have it available so get busy and fix this nagging problem.

You'll be famous in Texas! :eek:
 

Technical

Technical Support
Staff member
You have highlighted the problem. You are asking for a word processing column alignment type feature in a programming environment. In a programming environment tabs are used mainly for code indentation, not column alignment - a secondary feature is indeed to align comments, but primarily the purpose of tabs within programming usage is for code indentation (within loops, for..next etc). That is why they are always set to a fixed number of spaces (which can be user selected upon preference).

The software can't have both systems at the same time and so you are asking for a 'word processing' feature that would simply annoy and frustrate most programmers.
 

techElder

Well-known member
I appreciate you comment, but I'd bet if you polled the subject you'd find a different response.

However, I'm saying that you already do half of this. You allow us to highlight a block of code and hit TAB to move it all over to the right.

Now, just detect the REMARKs in that block and only move them and align them together. Leave the code part of the lines alone.

I'm not suggesting to highlight a block of columns (as in a wordprocessor.) I'm saying to highlight lines just as we do now.
 
Last edited:
Top