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

Re: Syntax highlighting for Notepad++ and TextPad

Post by Nash »

Missing from DECORATE:

Group 3: DistanceCheck
Group 4: CLIENTSIDEONLY

Suggestions for ACS:

Group 1: enum, struct (for gdcc-acc)
Blue Shadow
Posts: 5032
Joined: Sun Nov 14, 2010 12:59 am

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

Nash wrote:Group 1: enum, struct (for gdcc-acc)
Hm, not quite sure if I want to add non-ACC keywords to this...

As for the rest, that will be for the next update.
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Syntax highlighting for Notepad++ and TextPad

Post by Nash »

But... but... gdcc-acc is pretty much a drop-in acc.exe replacement... =D

Thanks for the other updates!
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space

Re: Syntax highlighting for Notepad++ and TextPad

Post by NeuralStunner »

Is there any way to import new keywords without overwriting personal modifications?

If nothing else, I may just have to import the updated styler as a new entry and copy/paste the lists. :?
User avatar
Caligari87
Admin
Posts: 6191
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him

Re: Syntax highlighting for Notepad++ and TextPad

Post by Caligari87 »

Could you do an A/B comparison or diff merge somehow? Not sure if that would work or not.

8-)
Blue Shadow
Posts: 5032
Joined: Sun Nov 14, 2010 12:59 am

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

I don't know if there is a way to do it more conveniently, apart from what Caligari87 suggested.

Though it's not convenient, the way I do it is to copy the keywords sections from the .xml file to:

Code: Select all

 ../AppData/Roaming/Notepad++/userDefineLang.xml
userDefineLang.xml is the file where user's imported language configurations are stored.

This saves on the "import" step. However, there is one caveat: you have to do the copying and pasting with another editor while Notepad++ is closed.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space

Re: Syntax highlighting for Notepad++ and TextPad

Post by NeuralStunner »

If only I could stand to edit XML in any other editor. :P

What I'll probably end up doing is adding the new keywords as I use/encounter them, heh.
Blue Shadow
Posts: 5032
Joined: Sun Nov 14, 2010 12:59 am

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

I'm thinking, would it be easier for you, and everybody else, if I put the configurations on GitHub?

The idea is that you clone the project from GitHub to your computer, do the changes you want to the cloned copy, and then each time the original project is updated, you do a merge. This way, the only thing you need to worry about is importing the configurations to the editor.
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Syntax highlighting for Notepad++ and TextPad

Post by Nash »

Blue: I actually wanted to suggest the Github idea the other day but forgot. =D
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Syntax highlighting for Notepad++ and TextPad

Post by Nash »

Found a really cool feature in Notepad++!

1) Browse to %APPDATA%/notepad++
2) Open functionList.xml
3) In the AssociationMap section, add this to the bottom:

Code: Select all

<association userDefinedLangName="ACS (LT)" id="c_cpp_function"/>
<association userDefinedLangName="ACS (DK)" id="c_cpp_function"/>
Save and close, and restart Notepad++. Go to View -> Function List. Enjoy a functional function list!

Image

The parser definition is kind of alien language to me right now so I don't really know how to specifically customize it for ACS (for example, letting it detect structs and enums and all that stuff for gdcc). And I imagine it would be madness to make parsing rules for DECORATE but, well, using the C/C++ parser for ACS is a start!

Oh and, in case it wasn't obvious: this only works if you're using BlueShadow's custom language definitions because we are associating his configs specifically in the AssociationMap
Blue Shadow
Posts: 5032
Joined: Sun Nov 14, 2010 12:59 am

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

Heads up! the configuration files are now on GitHub. See the opening post for links.
User avatar
Gutawer
Posts: 469
Joined: Sat Apr 16, 2016 6:01 am
Preferred Pronouns: She/Her

Re: Syntax highlighting for Notepad++ and TextPad

Post by Gutawer »

Would it be possible to get this syntax highlighting on Atom? Recently moved over to Atom from Notepad++ and the only thing I'm missing is this syntax highlighting :/
Blue Shadow
Posts: 5032
Joined: Sun Nov 14, 2010 12:59 am

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

Sorry, I wouldn't know, since I don't use that editor.
User avatar
Gutawer
Posts: 469
Joined: Sat Apr 16, 2016 6:01 am
Preferred Pronouns: She/Her

Re: Syntax highlighting for Notepad++ and TextPad

Post by Gutawer »

Mkay, that's fine. I'll have a look into translating it over myself.
Blue Shadow
Posts: 5032
Joined: Sun Nov 14, 2010 12:59 am

Re: Syntax highlighting for Notepad++ and TextPad

Post by Blue Shadow »

Heads up! Support for ZSCRIPT has been added.

Return to “Resources”