www.jupiter-ace.co.uk
 
Programming index > Text File Syntax Highlighting.
Text File Syntax Highlighting.
Here is something you might find useful if you develop AceFORTH code in a editor text file before you type it up on an Ace. Text files are a great way to develop programs and keep notes, but sometimes it would be handy to highlight LOOPs, and IF.. THEN...ELSE sturctures, numbers charactor and number input/output.
Everyone has there own favourite text editor the ones we like are UltraEdit and NotePad++, there is nothing wrong with the Windows notepad which is perfectly adequate. UltraEdit is shareware and a licence is needed for use after 30 days, while NotePad++ is a FREE to use editor, with these editors you can add an additional file that hightlights AceFORTH words.
UltraEdit AceFORTH syntax highlighting.
First you must download the UltraEdit_AceFORTH wordlist file. Its an ordinary text file that needs to be copied and pasted in to the UltraEdit's wordfile.uew which can be found in the UltraEdit's program folder, (usually C:\program files\IDM Computer Solutions\UltraEdit). If you are not sure on how to add this file check here.
Once done, you can now load your AceFORTH text file and from UltraEdit's main menu - View > View As (Highlight File Type) > AceFORTH. AceFORTH words will now be highlighted, also so, words can be folded up or down to make screen space by clicking on the : and ; AceFORTH words. An additional comment maker has been included, %: and %; these allow you to fold the code between them. When you type in AceFORTH code structures; LOOPs and IF..ELSE.. THEN statements they will be auto indented. It just makes the code more readable and pretty!
NotePad++ AceFORTH syntax highlighting.
NotePad++ is slightly differant, a userDefineLang.xml needs to be installed. First download the NPP_AceFORTH_Syntax zip file, open it and extract the userDefineLang.xml to location on your PC from where you can copy it later.
Next, Type %APPDATA%\Notepad++ in Run box, then Enter, and a folder will open.
Then copy the userDefineLang.xml we extracted form the zip file into the opened folder and relaunch Notepad++.
Once done, you can now load your AceFORTH text file and from NotePad++ main menu - language > NNP_AceFORTH. AceFORTH words will now be highlighted, also so, words can be folded up or down to make screen space by clicking on the : and ; AceFORTH words. An additional comment maker has been included,
%: and %; these allow you to fold the code between them. It just makes the code more readable and pretty!
Linux users can also run NPP for more details see here