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!
User avatar
Blue Shadow
Posts: 4904
Joined: Sun Nov 14, 2010 12:59 am
Graphics Processor: ATI/AMD (Modern GZDoom)

Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

This is a syntax highlight thingy for a few of the ZDoom special lumps to be used with Notepad++ or TextPad. The supported lumps are:

Code: Select all

----------------------------------------------------
| Lump     | Extensions (Notepad++) | Notes        |
|----------|------------------------|--------------|
| ACS      | .acs                   |              |
|----------|------------------------|--------------|
| DECORATE | .dec                   | Discontinued |
|----------|------------------------|--------------|
| MAPINFO  | .zmap                  |              |
|----------|------------------------|--------------|
| ZSCRIPT  | .zsc .zc .zs           |              |
----------------------------------------------------
Spoiler: Preview
Git repository
Download configurations
ACS auto-completion for Notepad++ - by boris (Optional)

Here is how to use:

(the following instructions concern Notepad++. For instructions on how to use it with TextPad, see here.)
  • Download the linked file and extract the .xml files contained within somewhere on your machine.

    (The files with the "dk" suffix are for a dark theme/style, and the ones with "lt" are for a light one. So go with what suits you.)
  • Start Notepad++ up and from the menu toolbar: Language --> Define your language...
  • In the User Defined Language window, click on Import and navigate to where you extracted the .xml files. Choose a file to import.
And that's it! If your file has one of the extensions from the table above, the syntax will be applied automatically on the file when it's opened. You can, of course, force the syntax on any file regardless of extension by choosing the language from the Language menu (it should be at the very bottom of the list).

Note: if after import you don't see the language in the Language menu, then just do a restart of the program.


Credits:
  • gamefreakdude and Nash for the DECORATE one, which I used as a guide.
  • sirjuddington and Gez for SLADE3's own syntax highlight configurations and the highlight colors used (for the light theme).
Last edited by Blue Shadow on Thu Aug 11, 2022 6:12 pm, edited 28 times in total.
User avatar
everamzah
Posts: 149
Joined: Tue Aug 20, 2013 10:17 am
Location: Augusta, ME.

Re: ACS syntax highlighting for Notepad++

Post by everamzah »

Thanks very much. It works great.
User avatar
Nash
 
 
Posts: 17283
Joined: Mon Oct 27, 2003 12:07 am
Twitch ID: nashmuhandes
Github ID: nashmuhandes
Location: Kuala Lumpur, Malaysia

Re: ACS syntax highlighting for Notepad++

Post by Nash »

Haha wow, totally forgot that I had a hand in the original definition... my brain is failing! XD Thanks for this BlueShadow!
User avatar
Blue Shadow
Posts: 4904
Joined: Sun Nov 14, 2010 12:59 am
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: ACS syntax highlighting for Notepad++

Post by Blue Shadow »

You're welcome!
User avatar
kodi
 
 
Posts: 1351
Joined: Mon May 06, 2013 8:02 am

Re: ACS syntax highlighting for Notepad++

Post by kodi »

Thanks a ton dude, this is amazing. Especially after I changed the colours to suit my black background 8-)
User avatar
Enjay
 
 
Posts: 26403
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: ACS syntax highlighting for Notepad++

Post by Enjay »

I don't suppose anyone fancies converting this to a Textpad SYN file do they?

I currently use the C highlighting and it works pretty well to be honest but an ACS specific setup would be nice if anyone fancied doing it.
User avatar
Apothem
Posts: 2070
Joined: Sat Nov 29, 2003 7:13 pm
Location: Performing open heart surgery on an ACS compiler.

Re: ACS syntax highlighting for Notepad++

Post by Apothem »

Oooooh! Handy! My old text editor software has changed a lot and the stuff I have is out of date. This is perfect for my needs! Thanks! :D
User avatar
Blue Shadow
Posts: 4904
Joined: Sun Nov 14, 2010 12:59 am
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: ACS syntax highlighting for Notepad++

Post by Blue Shadow »

Enjay wrote:I don't suppose anyone fancies converting this to a Textpad SYN file do they?
Here you go.

I suppose you already know how import/use the configuration?

Edit: I almost forgot, for the coloring part: Keywords 2 is for functions, Keywords 3 is for constants, and Keywords 1 is for pretty much any other keywords.
User avatar
Enjay
 
 
Posts: 26403
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: ACS syntax highlighting for Notepad++

Post by Enjay »

Blue Shadow wrote:I suppose you already know how import/use the configuration?
Yes I do, and it works like a charm. Thank you. :)
User avatar
Blue Shadow
Posts: 4904
Joined: Sun Nov 14, 2010 12:59 am
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

Added one for DECORATE. Also, in addition to the standard, light theme, a dark one is available.
User avatar
Kappes Buur
 
 
Posts: 4012
Joined: Thu Jul 17, 2003 12:19 am
Location: British Columbia, Canada

Re: Syntax highlighting for Notepad++ and TextPad

Post by Kappes Buur »

I used to select C for the scripts, but this is so much nicer.
Thanks.
User avatar
NeuralStunner
 
 
Posts: 12298
Joined: Tue Jul 21, 2009 12:04 pm
Discord: NeuralStunner#4201
Graphics Processor: nVidia (Modern GZDoom)
Location: capital N, capital S, no space

Re: Syntax highlighting for Notepad++ and TextPad

Post by NeuralStunner »

Kappes Buur wrote:I used to select C for the scripts, but this is so much nicer.
Same here.

Unfortunately I can't think of a nicer way to force Decorate styling for arbitrary filenames. I have literally hundreds of actor files across several projects, and changing the extensions on those would be a pain in the arse.

I don't suppose anyone knows of a way to force language detection from an opening comment? Perhaps needing a plugin?
User avatar
Kappes Buur
 
 
Posts: 4012
Joined: Thu Jul 17, 2003 12:19 am
Location: British Columbia, Canada

Re: Syntax highlighting for Notepad++ and TextPad

Post by Kappes Buur »

NeuralStunner wrote:.... I have literally hundreds of actor files across several projects, and changing the extensions on those would be a pain in the arse. ....
I find this one extremely helpful
http://www.leftandwrite.com/filenamemanager/
Gez
 
 
Posts: 17638
Joined: Fri Jul 06, 2007 3:22 pm

Re: Syntax highlighting for Notepad++ and TextPad

Post by Gez »

ren *.txt *.dec
User avatar
NeuralStunner
 
 
Posts: 12298
Joined: Tue Jul 21, 2009 12:04 pm
Discord: NeuralStunner#4201
Graphics Processor: nVidia (Modern GZDoom)
Location: capital N, capital S, no space

Re: Syntax highlighting for Notepad++ and TextPad

Post by NeuralStunner »

It's not that I don't know how to do it. I think Notepad++ is a great editor and there should be a way to make its features extension-agnostic.

Also I sometimes reach Gez levels of laziness. :P

Return to “Resources”