This is my second post. But I am not here to ask any question, I am here to share something. I don't know if it would help anyone. I have made an ORX config syntax highlighter and auto keyword-completion for notepad++. I have not found anything this kind in this forum, if anybody has better solution then please share it with us.
The main feature is
1. It differentiates int/bool and vector/float. So when I see a code I know how would be its value.
2. And the most amazing thing for me is auto complete. When I type a single letter it shows me all ORX config keyword so that I can choose the right keyword. A simple demonstration is given here.
Though,it may not be helpful for those who knows ORX but can be helpful for new users like me. But notepad++ is only for windows. So if anyone has made this kind of things for other cross-platform editor or any better syntax highlighter for notepad++ then please share it with us.
I have attached a zip file which contains two xml files, orx.xml and orx_syntax.xml. I am using notepad++ version 22.214.171.124, which is the current version I think. Now ,what to do to use this features :
Step 1: Start notepad++, click 'View' -> 'User Defined Dialogue' another sub window will pop up.
Step 2: Click 'Import' and then select orx_syntax.xml , when you get a pop up menu saying "Import Successful" then the ORX syntax highlighter is correctly imported. To see the change restart notepad++. Now when you click 'Language' from menu bar, you will see 'orx' at the bottom of the list. Now you can use ORX syntax highlighter selecting ORX.
Step 3: To use ORX auto code-complete feature go to the directory where notepad++ is installed, for me it is "C:Program FilesNotepad++". Then go to directory pluginsAPIs and copy the orx.xml file in this folder. You will also see c.xml, cpp.xml, java.xml, hlml.xml and even xml.xml in this folder.
To see the effect restart the notepad++.
Step 4: This is the final step. Open any orx configuration file and select ORX as language and you are done
You can press ctrl+shift to bring the keyword box or you can enable auto-completion by selecting
'Settings'-> 'Preferences' -> 'Backup/auto-completion'
clicking 'Enable auto-completion on each input' , 'function completion' and 'Function parameters hint on input'.
I am not very good at making tutorial, in fact this first time I am doing anything like this, so there may be mistakes. So, Pardon me if I have done any mistakes so far.
Here is the attachment , contains orx.xml and orx_syntax.xml
If it's not too much trouble, do you think you could add a quick section in the wiki (probably in the tutorial/setup section: http://orx-project.org/wiki/en/orx/tutorials/main)?
Thank you all. I did not except this kind of feedback from you guys I thought this would not be much of a help, but now it seems it would be helpful. Actually I don't know how to add tutorial, so if anybody add this in the wiki, it will be fine for me. Anybody can use it and change it. If I add something then I will post it here, because I have no experience with SVN. There may be mistakes so if anybody point it out then it will be helpful
Auto-completion works just fine but the function parameter may trouble some one, if anybody presses '=' after any keyword the parameter list will pop up and it will go down when pressing ';'
Anyone can stop showing function parameter, from notepad++ 'Settings' if it becomes annoying.
And thanks again, I have never got this much appreciation from anyone so I am very happy
I am back with a tiny change, I forgot to add 'pixel' as a keyword :P So, here is the one with 'pixel' added in both orx.xml and orx_syntax.xml , one has to go through the steps again if he does not add 'pixel' manually in the previous xmls. Please inform me if any other keyword is left out.
NB: Before importing orx_syntax.xml again, one has to delete the previous ORX from language list, otherwise there will be two ORX in language list, which can be frustrating.
I'll post in on the SVN myself then, sometimes during this week.
As a frequent user of N++, I love it. I think I was just too lazy to even think of doing something like this myself.
The one thing I've noticed that you're missing is that if you use a ; anywhere but on its own line, it doesn't grey what comes after it. Is there any way to fix that? It's not too big a problem, but it's just kinda weird to see a white, orange, or other colored comment when you're not paying too much attention and read the comment as code.
If this does not do then click 'Comment & Number' tab and make sure 'Treat symbol as keyword' box is checked and ';' is given in the white box.
I think I have found the fix, if you insert ';' immediately after any character without any white space before ';' , then it will not be treated as a comment symbol.
So just use a blank space before ';' , this will definitely fix it and I hope so.
By the way, I think you missed a keyword:
EDIT: Nope, I was wrong. The keyword is ParentCamera. No wonder! I thought something was off in my code. Your syntax highlighter has actually helped me catch a bug! you rock!
Let me know if anything is wrong or some changes are needed. How is the auto-complete function ?
I am not currently doing anything as my exam is going on, so I am unable to use it in any project, if you are using it then it will be a kind of beta testing for this tool
Just go to Settings -> Preferences -> Backup/Auto-completion then click 'Function parameters hint on input' and you will see the magic :ohmy:
I noticed some config changes in the latest SVN so I have added those. So I added ShowDebug, FXDelayList , RGB , HSL , HSV.
Thanks for the update! I should add a tool section on the wiki and you could link your file there if you wish.
I completely switched to Sublime Text 2 myself, so having syntax highlight/completion there would be awesome.
It's using the Textmate language definition syntax, except with JSON instead of PList. I'm pretty sure you already have this link, but just in case: http://sublimetext.info/docs/en/reference/syntaxdefs.html
I was checking ORX tutorial 7, which is FX tutorial and I noticed I missed "Absolute". It is in the highlighter but not in the code-completion and thought to add it.
So far I have checked Gray's tutorial and ORX tutorial 1-6 still many things to learn. But so far learning ORX has been great for me I wish I found ORX a year ago,but it is not too late. I will surely back if I have any questions so far no question.
Thanks everybody and hail ORX
Edit : Oooooops, I first tried to upload the orx.xml, then a message pops us saying only compress files allowed. Here is the file in zip, hehe............
I should definitely create a tools section in the wiki and you could update it there. I can also give you online storage space if you need it.
I'm glad you still enjoy learning orx! Looking forward to seeing what you make with it.
Btw, there's a mailing list where all commits made on the SVN are published if you want to get automatically updated.
Edit: But I don't know what to do so that I get mail containing SVN update.