Page 4 of 5

Re: Syntax highlighting for Notepad++ and TextPad

Posted: Tue May 22, 2018 7:14 am
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]

Re: Syntax highlighting for Notepad++ and TextPad

Posted: Tue May 22, 2018 7:29 am
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.

Re: Syntax highlighting for Notepad++ and TextPad

Posted: Tue May 22, 2018 9:09 am
by Blue Shadow
I'm using a Windows theme. It's a "high contrast" one, specifically.

Re: Syntax highlighting for Notepad++ and TextPad

Posted: Wed Apr 10, 2019 11:43 pm
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.

Re: Syntax highlighting for Notepad++ and TextPad

Posted: Thu Apr 11, 2019 5:58 am
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.

Re: Syntax highlighting for Notepad++ and TextPad

Posted: Thu Apr 11, 2019 7:47 am
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.

Re: Syntax highlighting for Notepad++ and TextPad

Posted: Wed Apr 24, 2019 12:26 am
by Blue Shadow
Okay. I'm back on-track with this. The configurations should be up-to-date.

Re: Syntax highlighting for Notepad++ and TextPad

Posted: Wed May 27, 2020 8:02 am
by Blue Shadow
Just pushed an update after a six-month hiatus. Yeah, this isn't dead yet.

Re: Syntax highlighting for Notepad++ and TextPad

Posted: Wed May 27, 2020 1:17 pm
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:

Re: Syntax highlighting for Notepad++ and TextPad

Posted: Thu May 28, 2020 9:01 am
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.

Re: Syntax highlighting for Notepad++ and TextPad

Posted: Thu May 28, 2020 9:44 am
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.

Re: Syntax highlighting for Notepad++ and TextPad

Posted: Fri May 29, 2020 4:12 pm
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.

Re: Syntax highlighting for Notepad++ and TextPad

Posted: Fri May 29, 2020 6:58 pm
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.

Re: Syntax highlighting for Notepad++ and TextPad

Posted: Sat May 30, 2020 8:07 am
by Blue Shadow
You're welcome, sir. :)

Re: Syntax highlighting for Notepad++ and TextPad

Posted: Sun Jul 26, 2020 12:14 pm
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