Special highlighting feature within comments

Share your advanced PureBasic knowledge/code with the community.
User avatar
Keya
Addict
Addict
Posts: 1890
Joined: Thu Jun 04, 2015 7:10 am

Special highlighting feature within comments

Post by Keya »

I accidentally stumbled upon this seemingly undocumented ([edit] ok, only slightly[/i-documented!) feature just by typing one of the two special keywords, but when I searched for it in Google there was only one or two proper references to it, and in the PB Helpfile the only reference to it was a brief mention sneakily hidden away in the History section, which is what most of the five or so other Google references were. I couldn't see anything about it at the "Comments" page in the helpfile either, an amendment maybe? :)

THE FEATURE!
If you type "TODO" or "FIXME" in all uppercase within a comment it specially highlights that part of the comment and all words after it (anything before it like the ";" comment marker itself remains as regular comment color), making it really easy to mark & get back to important things later because unlike regular comments which don't stand out (which i think is a good thing) these ones do :)
Image
I think its a really handy feature and Ive started using it a LOT already (but maybe that says a lot about how bad about my code is), thanks Fred! :)
Last edited by Keya on Sat Aug 15, 2015 12:27 am, edited 1 time in total.
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: Undocumented special highlighting feature within comment

Post by c4s »

It's certainly a cool feature (officially added in PB 5.30), but not as undocumented and hidden as you say! Check out the IDE preferences -> Editor -> Issues for more not-so-hidden customization options. It's also mentioned in the "Customizing the IDE" section of the help file. And a couple of months ago there were some new discussions and tricks (e.g. here)... ;)
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
User avatar
Keya
Addict
Addict
Posts: 1890
Joined: Thu Jun 04, 2015 7:10 am

Re: Special highlighting feature within comments

Post by Keya »

Oh, excellent! We can even add our own! :)
Now I can add extra comment alerts like "IDEA", "FORLATER", and "THISISJUSTPLAINSTUPID" :)
I see that it's documented as "Issues"... when i stumbled upon it all i knew was that "TODO" was highlighted so that's the only thing I had to search for (and from that POV yes it's undocumented, lol) :)
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Special highlighting feature within comments

Post by Kwai chang caine »

Cool i have not see this option :shock:
So i use again the 5.23, but it's another reason to change my version in futur time.
Thanks KEYA to show this option with a picture for immediately see the interest
And thanks to C4S to explain for the preference 8)
ImageThe happiness is a road...
Not a destination
freak
PureBasic Team
PureBasic Team
Posts: 5941
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Special highlighting feature within comments

Post by freak »

There is another part to this feature:
Under "Tools -> Issue Browser" you can view all marked issues as a list and jump to the relevant code line by double-clicking. If you have a project, you can see the issues for the entire project (even in files that are not open). It can be used as a todo-list for the project.
quidquid Latine dictum sit altum videtur
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Special highlighting feature within comments

Post by Kwai chang caine »

Thanks FREAK
Not see this new feature too, in tool menu 8)
ImageThe happiness is a road...
Not a destination
Post Reply