A Suggestion

I recently (five minutes ago) found myself writing two blocks of similar code that do opposite things. I thought about the ease with which I can comment a section (a co-worker was envious), and wished that I could color-code a block of code. This would be 1 - select block, 2 - right-click, and 3 - choose color.

This would allow me to quickly find a block of code (perhaps something really important that I flagged as red) and easily allow me to distinguish between adjacent blocks that may be similar.

Maybe this exists in some different format, but I didn’t see it. Feel free to correct me on this, but remember that Santa is watching.

Can I pleeeeeaaaasssssseee have this? Can I? Can I?

Not sure what you are describing?
Syntax Highlighting is based on the content of the text (ie. code)
certain groups of words are certain colors (and you can change what the colors are)
but not an easy task for Xojo to implement the ability to color a arbitrary block of code a particular color

What I’d like to see (and no I won’t submit a feature request, because I can’t)

  • Different colors defined for ’ and // type comments
  • Define a color for #IF and #Pragma statements
  • and while we are sitting on Santas lap (FIGURE OF SPEECH!), how about /* */ style comments too

I could see different colors interfering with color-coded syntax. Good point. But how about color coding down the left side where breakpoints are set?

what you see is what you get…
anything else… submit a feature request, and wait

+1 for multi line comments with /* */
I had made a feature request for it, but it got shut down because the workaround is to select all the lines you want and use the comment menu item. Dumb excuse if you ask me.

Like this?

while a pretty picture is has no bearing on what Xojo can or cannot do

Its called a “Mock Up” of the feature so that someone could visualise the wordage…

:slight_smile:

Matthew, have you found the bookmark feature yet?

my point was you picture without a disclaimer inferred that it was from Xojo, and that that feature was available

Fixed, refresh :slight_smile:

[quote=364738:@Matthew Mills]I recently (five minutes ago) found myself writing two blocks of similar code that do opposite things. I thought about the ease with which I can comment a section (a co-worker was envious), and wished that I could color-code a block of code. This would be 1 - select block, 2 - right-click, and 3 - choose color.

This would allow me to quickly find a block of code (perhaps something really important that I flagged as red) and easily allow me to distinguish between adjacent blocks that may be similar.

Maybe this exists in some different format, but I didn’t see it. Feel free to correct me on this, but remember that Santa is watching.

Can I pleeeeeaaaasssssseee have this? Can I? Can I?[/quote]
No! You cannot! Actually, I’ve no idea. You should file a Feedback case. However, the Code Editor is pretty busy these days already, so can I suggest you try other methods, such as:

  • Better use of comments, including multi-line comments where required, to distinguish similar blocks of code
  • If the blocks of code are indeed really similar, perhaps consider converting the block to a function, passing in parameters for different behaviors

These are probably fairly obvious suggestions to you but just in case…

Looks like we’ve been being ignored for 8 years when it comes to multi-line comments:
feedback://showreport?report_id=10417

[quote=364860:@Tim Parnell]Looks like we’ve been being ignored for 8 years when it comes to multi-line comments:
feedback://showreport?report_id=10417[/quote]
Not only are /* */ style comments standard in almost every other developement environment,
the are 1000x easier for the developer to use than adding comments to EVERY line in a block of code
plus they have the advantage of “setting” that code block apart (albeit it slightly) for other comments
and if implemented properly can have a whole syntax highlight theme of their own

[code] #if false // a multiline comment

			this is never compiled
			and neither is this.
			
			In fact it is completely ignored!
			Even if it uses key words like dim and integer
			
	#endif  // end of a multiline comment
	
	msgbox "Hello there!"[/code]

Jeff… nice idea… but as you are aware that is a “hack”
and doesn’t support any syntax highlighting rules… and is more typing too :smiley:

but still an idea :slight_smile:

@Jeff As a customer I’m just plain old sick of being ignored.

Did someone say something then? :wink:

Make a new post and ask for votes in feedback?

[quote=364872:@JulianS]Did someone say something then? :wink:

Make a new post and ask for votes in feedback?[/quote]

Votes in feedback don’t really mean anything.