Simple IDE addition:Specialized Folded Color/Bolded Comments

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
deathmx
User
User
Posts: 27
Joined: Mon Feb 26, 2018 3:14 am

Simple IDE addition:Specialized Folded Color/Bolded Comments

Post by deathmx »

Hello, I was wondering if it is possible to add keywords via comment to help organize large amounts of code.
Specialized comments.

If i used ;[ BoldColorThis to make a comment look a little different then a comment.

Basically i would like to be able to Fold the code like using ;{ but with a different color and bold to make it look less like a regular comment. So that it seems more important. When using ";{ Group Main Structures" for example it looks Really like there is just a plain comment there. This way if the code folded in a ;{ comment would really feel more important.


Thank you :D
User avatar
Derren
Enthusiast
Enthusiast
Posts: 313
Joined: Sat Jul 23, 2011 1:13 am
Location: Germany

Re: Simple IDE addition:Specialized Folded Color/Bolded Comm

Post by Derren »

Hi,

I experimented with the issues-fuctions to achieve this.
sadly I wasn't able to get ;[ to get work, but this worked for me. it's not exactly what you wanted, but I think as a workaround it's okay

Code: Select all

;{x important comment
Go to settings and create a new "issue" with the following Regular Expression: \{x\b.* and give it any color you want. Select "change line background", pick a nice contrasting color (you can't make it bold).

You need to add ;{x as a folding start keywords as well.
deathmx
User
User
Posts: 27
Joined: Mon Feb 26, 2018 3:14 am

Re: Simple IDE addition:Specialized Folded Color/Bolded Comm

Post by deathmx »

Hi Darren,

Thanks for the tip :) ! I have tried to add ;{x to the keywords and it seems comments are not effected by keywords. I ended up making a Blank Macro/keyword Named Group and EndGroup. It would be nice if i could put a bold word after it describing the group. Using the Issue List seems like a good idea. I may add this to the comments after the group keyword to highlight the line.
User avatar
Derren
Enthusiast
Enthusiast
Posts: 313
Joined: Sat Jul 23, 2011 1:13 am
Location: Germany

Re: Simple IDE addition:Specialized Folded Color/Bolded Comm

Post by Derren »

why not just "Group ;important group"

and add Group to the keyword list to make it bold.

The advantage of the issue is that you can add it to to procedure list, like a ";-" comment
deathmx
User
User
Posts: 27
Joined: Mon Feb 26, 2018 3:14 am

Re: Simple IDE addition:Specialized Folded Color/Bolded Comm

Post by deathmx »

That's exactly what i did :)
Post Reply