Like other text editors, Notepad++ (which is recommended by the basic tutorial) uses a system called Syntax Highlighting which helps in coding by visually identifying different parts of code with color. This allows you to more easily read the code, helping both in drawing it up and spotting errors. It is also relatively easy to modify the syntax, changing what is highlighted and how the highlighting works.
Notepad++ does not come with the ChoiceScript Syntax Highlighter pre-installed. However, one has been created and can be downloaded and installed easily.
After downloading the choicescript.xml file, follow the steps described below.
- Open Notepad++
- Click on the "language" drop-down menu and select "Define your language" and a new window will open.
- Click the import button and navigate to the location where you downloaded the choicescript.xml file (usually it will be in your downloads folder). A pop up should now confirm the import was successful.
- Above the import button, click on the drop-down "User Define Language" field and select choicescript.
- Close the window and exit Notepad++
- Open Notepad++ once again, go back to the language menu, and at the bottom between "Define your language" and "User-Defined" you should find "choicescript". Select it and and your code should automatically be highlighted.
The Syntax Highlighter is short and easily modified by going to Language > Define your language and selecting choicescript in the User language menu at the top of the new window. This will cover editing the syntax highlighter in Notepad++. There are three categories that every part of the highlighter falls into: Settings, Keywords and Style.
Most of the settings will not make a large difference if changed, and should probably be left as they are. The only one that people may have different opinions on are caseIgnored, which some people may wish to change to "no" to force the highlighter to only highlight things that have the same case.
There are four possible lists of keywords, three of which are used to begin with. There are also lines for "Comment" (the *comment command), "Operators" (a number of symbols used in CS, such as parentheses, the equals sign, and exclamation points) and "Delimiters" (Which are quotation marks).
The keywords themselves are easy enough to figure out (simply leave a space and write in the new words to add to the list). One trick you might want to try is, if you have some important variables or other keywords you want highlighted, to list them in the forth keywords list (but remember to change the color it highlights them, see style below).
However, operators and delimiters require a little more care. For the most part you should probable leave them (or, if you don't like it highlighting them, you can simply delete what's in them (so that they look like the "Folder+"/"Folder-" lines). There is one exception you might find though. If you have a lot of coding in the middle of text, you may find that delimiters affect more than you want. In that case you'll probably want to move them to operators. Simply cut what's listed for delimiters, put a space at the end of the operators, and paste.
For the most part, there is only one thing to do in style, which is change the color. To do so, you'll want to look online for "hex color codes" (Here is a good one to use). You'll see two colors for each: fg (foreground) and bg (background) which mean the color of the character, and the color of the background of the character.