Jump to content
seadoggie01

ToDo Items In script

Recommended Posts

One of my favorite things about coding in other languages/IDEs is the ability to put a ToDo comment in to remind myself to do something later that isn't important yet. Like when I run a script once a month and I need to manually change the column in Excel each time. Or something that I want to fix some other day. So I've been exploring LUA and SciTE and managed to add some highlighting to it with this:

#~ SciTEUser.properties ~#
#
#~ Make "#ToDo" a "special" keyword
#
keywords6.$(au3)=#todo  $(au3.keywords.special) $(autoit3wrapper.keywords.special)

Which makes it look like the middle one:

image.png.1f15a0152fe0232c2046ddac271ebff3.png

I would really like to seperate it from the other keywords if possible to make it stand out even more since I could add different background then. I'm also curious why #Region has a secondary green color as all of the text following it and if it would be possible to mimic that with #ToDo

(Sorry if this doesn't go here, but I thought since it related to SciTE more than AutoIt it should)


All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Share this post


Link to post
Share on other sites

I assume this is in a .au3 file?
I have hardcoded the  #Region/#EndRegion logic in au3lexer to make the remaining part a "Comment" and use that Format.
To give the "#todo  line" the same color as #Region, you just add it to this line in autoit3wrapper.keywords.properties: 

au3.keywords.special=#endregion #forcedef #forceref #ignorefunc #pragma #region #todo

Jos

Share this post


Link to post
Share on other sites

Yes, it's an au3 :) I edited that line, but it didn't work... #EndRegion isn't highlighted anymore and nothing happened to #ToDo

If this is a bad idea, I completely understand :D I can live with mimicking the other keywords
 

Edit: Had to re-install SciTE... I messed up one of the files.

Edited by seadoggie01

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...