Syntax highlighting for Notepad++ and TextPad

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
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?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

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]
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Syntax highlighting for Notepad++ and TextPad

Post by Nash »

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.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

I'm using a Windows theme. It's a "high contrast" one, specifically.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

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.
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: Syntax highlighting for Notepad++ and TextPad

Post by Gez »

What do you mean by "died" and why do you need to restart from scratch? The GitHub repository appears to still be there.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

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.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

Okay. I'm back on-track with this. The configurations should be up-to-date.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

Just pushed an update after a six-month hiatus. Yeah, this isn't dead yet.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Syntax highlighting for Notepad++ and TextPad

Post by Enjay »

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. :thumb:
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

Enjay wrote:Thanks for continuing to maintain this. It is very much appreciated.
You're welcome.
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).
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?
Anyway, I just downloaded and installed the new Textpad versions and they seem to be working just fine. :thumb:
Ah good! I was worried that it might've broken at some point without me knowing.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Syntax highlighting for Notepad++ and TextPad

Post by Enjay »

Blue Shadow wrote:But, I could try and add support for a few, though which ones?
Heh, I was mostly thinking out loud and just mooting the possibility really. The need is far from pressing.

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.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

Yeah, MAPINFO and GLDEFS seem to be the best candidates for initial support.
Enjay wrote:Heh, I was mostly thinking out loud and just mooting the possibility really. The need is far from pressing.
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.

Edit: MAPINFO support is in.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Syntax highlighting for Notepad++ and TextPad

Post by Enjay »

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.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

You're welcome, sir. :)
boris
Posts: 736
Joined: Tue Jul 15, 2003 3:37 pm

Re: Syntax highlighting for Notepad++ and TextPad

Post by boris »

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
Post Reply

Return to “Resources”