Page 1 of 1

4DScript Syntax Highlighting in Notepad++

Posted: Thursday 02 July, 2015 - 12:38
by JorisGoosen
Ever have one of those days where you would like to edit ED-files in a text-editor and find it hard to separate the comments from the code?

These days are luckily over! That is, when you download the attachment [attachment=0]4DScriptSyntaxHighLighting.zip[/attachment] extract the xml-file from it and start (using) Notepad++.

To activate syntax highlighting in Notepad++, open the "Language"-menu and the "Define your language.."-option.
Now you see a window with several options, the one of interest would be "Import".
Select 4DScriptSyntaxHighLighting.xml and it should now appear in the "Language"-menu.

When you open *.4ds, *.atm, *.gui or *.app files they should light up automatically but you can always manually turn it on by selecting it from the menu.

I hope someone will find this useful and if anyone improves it, post it here and Ill make sure the newest version be attached here.

Re: 4DScript Syntax Highlighting in Notepad++

Posted: Tuesday 21 July, 2015 - 19:04
by Chiara
Hello,

thank you very much for this file, i think it's very usefull having the 4Dscript language in notepad++.

I tried, and the result is like this:
CatturaED.JPG
CatturaED.JPG (71.93 KiB) Viewed 20135 times
I can't understand why there are some words blue coloured and others green coloured...I did something wrong?

Thank you

Re: 4DScript Syntax Highlighting in Notepad++

Posted: Wednesday 22 July, 2015 - 10:46
by JorisGoosen
Hello Chiara,

First, let me start by assuring you that you didn't do anything wrong, the differently coloured words result from the way the syntax highlighting in notepad++ works.
The blue parts are because they come after a '[' (they are strings) but because the limited syntax highlighting in notepad++ does not understand nested strings of this kind it stops the string-highlighting after the first ']' it encounters.
For the other part, things like 'att' or 'vtp' should be highlighted, but they are defined as prefix-keywords which means that they'll take anything not separated by whitespace as being part of the keyword.

Adding some spaces to your code should light the words up though, besides that it'll make it easier to read at any rate.