Syntax highlighting for Notepad++ and TextPad
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
Consult the Resource/Request Posting Guidelines for more information.
Please don't put requests here! They have their own forum --> here. Thank you!
Before posting your Resource, please make sure you can answer YES to any of the following questions:
- Is the resource ENTIRELY my own work?
- If no to the previous one, do I have permission from the original author?
- If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
Consult the Resource/Request Posting Guidelines for more information.
Please don't put requests here! They have their own forum --> here. Thank you!
-
- Posts: 4928
- Joined: Sun Nov 14, 2010 12:59 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Syntax highlighting for Notepad++ and TextPad
For the last few days I've been working on adding a calltips feature for ZScript (Notepad++ only), and... here it is:
https://www.dropbox.com/s/4ktea1vu5kjfn ... s.zip?dl=1
It doesn't support every single function out there, but it does so for a good number of them.
Now, to install this, copy the zscript.xml file into <path_to_notepad++>\plugins\APIs. Rename the language of the syntax highlighter from "ZSCRIPT (DK/LT)" to "ZScript". Launch Notepad++ and from the menus bar go to: Settings->Preferences->Auto-Completion. Tick the Function parameters hint on input option.
I'm considering this feature "experimental" for now. Depending on the feedback I get, if any, I might or might not go official with it.
[imgur]https://i.imgur.com/HT03deo[/imgur]
https://www.dropbox.com/s/4ktea1vu5kjfn ... s.zip?dl=1
It doesn't support every single function out there, but it does so for a good number of them.
Now, to install this, copy the zscript.xml file into <path_to_notepad++>\plugins\APIs. Rename the language of the syntax highlighter from "ZSCRIPT (DK/LT)" to "ZScript". Launch Notepad++ and from the menus bar go to: Settings->Preferences->Auto-Completion. Tick the Function parameters hint on input option.
I'm considering this feature "experimental" for now. Depending on the feedback I get, if any, I might or might not go official with it.
[imgur]https://i.imgur.com/HT03deo[/imgur]
-
-
- Posts: 17357
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: Syntax highlighting for Notepad++ and TextPad
How do you make your entire Notepad++ UI black? The last time I tried, I could only change the text editor portion to black... but the other Windows elements (like the taskbar at the top, the menu bar etc) remain white.
-
- Posts: 4928
- Joined: Sun Nov 14, 2010 12:59 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Syntax highlighting for Notepad++ and TextPad
I'm using a Windows theme. It's a "high contrast" one, specifically.
-
- Posts: 4928
- Joined: Sun Nov 14, 2010 12:59 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Syntax highlighting for Notepad++ and TextPad
A bit of an update: I'm currently working on reviving this thing after it had died at the end of November, doing it from scratch. It'll take a good while to bring it back from the dead, and it'll be the last time that I do. If it ever dies again, that's it.
As for the calltips feature, for anyone wondering, it's canceled.
As for the calltips feature, for anyone wondering, it's canceled.
-
-
- Posts: 17751
- Joined: Fri Jul 06, 2007 3:22 pm
Re: Syntax highlighting for Notepad++ and TextPad
What do you mean by "died" and why do you need to restart from scratch? The GitHub repository appears to still be there.
-
- Posts: 4928
- Joined: Sun Nov 14, 2010 12:59 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Syntax highlighting for Notepad++ and TextPad
I stopped updating it for reasons I won't discuss, so it fell behind. A lot happened ZScript-wise since then (scriptification, new stuff, and directory reorganization) that figuring out what needs to be added, changed or removed in the config files is going to be a pain. Redoing it is also a pain, but it's a lesser one, so I'm going with that.
-
- Posts: 4928
- Joined: Sun Nov 14, 2010 12:59 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Syntax highlighting for Notepad++ and TextPad
Okay. I'm back on-track with this. The configurations should be up-to-date.
-
- Posts: 4928
- Joined: Sun Nov 14, 2010 12:59 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Syntax highlighting for Notepad++ and TextPad
Just pushed an update after a six-month hiatus. Yeah, this isn't dead yet.
-
-
- Posts: 26443
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Syntax highlighting for Notepad++ and TextPad
Thanks for continuing to maintain this. It is very much appreciated.
Are there any other GZDoom control lump formats that are worth getting a similar treatment (and which you would be interested in supporting of course). I'm thinking probably not simply because things like SNDINFO, MAPINFO and even MODELDEF are sort of "one shot, one function" lumps but I just thought that I'd ask the question.
Anyway, I just downloaded and installed the new Textpad versions and they seem to be working just fine.
Are there any other GZDoom control lump formats that are worth getting a similar treatment (and which you would be interested in supporting of course). I'm thinking probably not simply because things like SNDINFO, MAPINFO and even MODELDEF are sort of "one shot, one function" lumps but I just thought that I'd ask the question.
Anyway, I just downloaded and installed the new Textpad versions and they seem to be working just fine.

-
- Posts: 4928
- Joined: Sun Nov 14, 2010 12:59 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Syntax highlighting for Notepad++ and TextPad
You're welcome.Enjay wrote:Thanks for continuing to maintain this. It is very much appreciated.
Never considered supporting other lumps, since I mostly work with ZScript and ACS, and the other lumps are relatively simpler in syntax to the point I don't have that much need for a syntax highligher. But, I could try and add support for a few, though which ones?Are there any other GZDoom control lump formats that are worth getting a similar treatment (and which you would be interested in supporting of course).
Ah good! I was worried that it might've broken at some point without me knowing.Anyway, I just downloaded and installed the new Textpad versions and they seem to be working just fine.
-
-
- Posts: 26443
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Syntax highlighting for Notepad++ and TextPad
Heh, I was mostly thinking out loud and just mooting the possibility really. The need is far from pressing.Blue Shadow wrote:But, I could try and add support for a few, though which ones?
I guess the ones that have more complex syntax or, perhaps, the ones that do a few different things within them would be the higher priorities.
MAPINFO might be a good example, and it's possibly the one that has the most diverse set of things that it can be used for. Obviously, it's there for defining map parameters, but the blocks of text for clusters (enter/exit text) would be nice if they could be easily identified by colour. Then MAPINFO also supports episode definitions, the gameinfo section, EdNums for things, intermissions and more. MAPINFO can become quite complicated these days in a big project.
GLDEFS can also get complicated. It has light definitions and the allocation of lights to actors, skybox definitions, material definitions, glowing flat defintions...
I think most of the other control lump types are simpler in as much as they generally only do a couple of things. Therefore the need for them would be less pressing and more of an "it looks prettier" thing now rather than massicely helping usability. e.g. SNDINFO is mostly for defining sounds and then (optionally) defining ambient sound entries. While it would be nice to have them colour-coded, I suggest that it would be less important than for the more complicated lumps. DECALDEF is probably similar (define decals and then allocate them) as is TERRAIN (define terrains and then allocate them to flats). I guess that SNDSEQ is much the same level of complexity too.
ANIMDEFS has a few things it supports (different types of animation, switches, warps) but none of it is that complicated.
I think MODELDEF is reasonably straight forward and really only single-purpose. Perhaps LOCKDEFS is similar to that.
LANGUAGE could be made pretty, but, again, probably not needed.
MENUDEF could perhaps benefit. Although it's reasonably straight forward in concept, it can become complicated from a code perspective once various options and nested menus are defined.
SBARINFO would have been a suggestion but I it's deprecated in favour of ZScript status bars now.
-
- Posts: 4928
- Joined: Sun Nov 14, 2010 12:59 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Syntax highlighting for Notepad++ and TextPad
Yeah, MAPINFO and GLDEFS seem to be the best candidates for initial support.
Edit: MAPINFO support is in.
Hey, if it's going to be of use to someone, then I don't mind putting in the effort. Although, I doubt I'll add support for every lump.Enjay wrote:Heh, I was mostly thinking out loud and just mooting the possibility really. The need is far from pressing.
Edit: MAPINFO support is in.
-
-
- Posts: 26443
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Syntax highlighting for Notepad++ and TextPad
Oh wow! I just gave it a quick try with a couple of reasonably complicated MAPINFO lumps (Textpad version). It seemed to work perfectly and I'm actually surprised just how much more approachable and easier to work with it made the code inside the files. Thank you.
-
- Posts: 4928
- Joined: Sun Nov 14, 2010 12:59 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Syntax highlighting for Notepad++ and TextPad
You're welcome, sir. 

-
- Posts: 714
- Joined: Tue Jul 15, 2003 3:37 pm
Re: Syntax highlighting for Notepad++ and TextPad
I created an auto-completion file for ACS to work alongside the syntax highlighting. I created a new thread here: viewtopic.php?f=37&t=69425