- Notepad++ eZ80 Syntax Highlighting
- 16 Dec 2015 06:27:42 pm
- Last edited by Hactar on 31 Dec 2015 07:56:22 pm; edited 1 time in total
A while back I found some an Notepad++ syntax highlighting XML file for Z80 assembly, and used this for a while doing eZ80 development, but it bothered me that a few things weren't ever highlighted, for example the mlt instruction, or the opcode prefixes (.sis, .sil, .lis, etc.) and, for some reason, none of the registers but A. So I modified it a bit and added eZ80 support. It's not really anything special, but especially considering there is no eZ80-focused IDE (that I'm aware of) this might be a help to any die-hard Notepad++ fans out there.
In addition to adding eZ80 support, I added an unconventional form of comment folding meant to be similar to other languages' #regions. You may place an opening curly bracket on a single-line comment, then later on a closing curly bracket on another single-line comment in your code to allow folding of that section. If this is annoying you can turn off comment folding (or edit the language to get rid of that weird stuff).
Here's a download, and in case that doesn't work I've put it all on Pastebin too.
To install, download the file to someplace easy to remember (for example, your desktop) and make sure it is named userDefineLang_eZ80.xml or something similar. Open Notepad++ and go to "Language" → "Define Your Language" → "Import" and find userDefineLang_eZ80.xml. Once you've imported the file, close the "User Defined Language" window (do not click "Save As") and exit Notepad++ completely. When you restart it, you should see all of your eZ80 assembly beautifully highlighted!
Let me know if there's anything that doesn't work as expected, or if you want something new! Feel free to create modified versions with different color schemes and I can post those here too.
In addition to adding eZ80 support, I added an unconventional form of comment folding meant to be similar to other languages' #regions. You may place an opening curly bracket on a single-line comment, then later on a closing curly bracket on another single-line comment in your code to allow folding of that section. If this is annoying you can turn off comment folding (or edit the language to get rid of that weird stuff).
Here's a download, and in case that doesn't work I've put it all on Pastebin too.
To install, download the file to someplace easy to remember (for example, your desktop) and make sure it is named userDefineLang_eZ80.xml or something similar. Open Notepad++ and go to "Language" → "Define Your Language" → "Import" and find userDefineLang_eZ80.xml. Once you've imported the file, close the "User Defined Language" window (do not click "Save As") and exit Notepad++ completely. When you restart it, you should see all of your eZ80 assembly beautifully highlighted!
Let me know if there's anything that doesn't work as expected, or if you want something new! Feel free to create modified versions with different color schemes and I can post those here too.