DECORATE language configuration for Notepad++

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
GFD
Posts: 343
Joined: Mon May 31, 2010 7:42 pm
Location: Canada

DECORATE language configuration for Notepad++

Post by GFD »

Threw this together quickly to help me edit a bit more efficiently. Maybe someone here will find it useful too.
You can import this via View > User-Defined Dialogue > Import, and also edit this configuration within that window.
User avatar
Nash
 
 
Posts: 17319
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: DECORATE language configuration for Notepad++

Post by Nash »

Very, very useful! Thank you for this.
Zombieguy
Posts: 1880
Joined: Mon May 24, 2010 4:38 pm
Location: C:\Earth>

Re: DECORATE language configuration for Notepad++

Post by Zombieguy »

Oh yes, thanks you!
User avatar
SFJake
Posts: 530
Joined: Sat Nov 03, 2007 11:28 am

Re: DECORATE language configuration for Notepad++

Post by SFJake »

So, you import it, then what?

It doesn't do anything at that point. How do you use it?
User avatar
GFD
Posts: 343
Joined: Mon May 31, 2010 7:42 pm
Location: Canada

Re: DECORATE language configuration for Notepad++

Post by GFD »

Set the language of the document you're editing to DECORATE in the language menu. It will also automatically use the DECORATE language for any files with the .decorate extension.
User avatar
SFJake
Posts: 530
Joined: Sat Nov 03, 2007 11:28 am

Re: DECORATE language configuration for Notepad++

Post by SFJake »

Oh, thanks, that works.
User avatar
Nash
 
 
Posts: 17319
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: DECORATE language configuration for Notepad++

Post by Nash »

Hi, I have a small problem.

Image

In this image, you can see that the colouring for the open and closed curly brackets are kind of inconsistent... is this fixable?
User avatar
GFD
Posts: 343
Joined: Mon May 31, 2010 7:42 pm
Location: Canada

Re: DECORATE language configuration for Notepad++

Post by GFD »

Don't think so - at least, I couldn't find a solution. Notepad++ doesn't give that much flexibility for user-created language configurations.

Edit: Well, you could replace the ACTOR folder open keyword in the configuration with {, but then you have to make sure you don't have anything that's not whitespace on either side of that brace. I just found it's easier for me to use ACTOR as the keyword instead; I typically don't put that brace on a newline. View > User-defined dialogue will let you edit user-installed language configurations.
User avatar
Nash
 
 
Posts: 17319
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: DECORATE language configuration for Notepad++

Post by Nash »

Alright, I got it figured out somewhat, if anyone who has a similar coding style to mine wants a fixed version here it is.

What's changed:

- Fixed folder detection - if your coding style is similar to my screenshot (or the following in case the image expires), folders should be properly detected.
Spoiler:
- Added ( and ) to the operators, so that if you don't add spaces next to your functions, it would highlight the keyword properly

Example: If you code like so - A_SpawnItemEx( instead of A_SpawnItemEX ( - the keywords will now be highlighted properly.

- Fixed some typos in the last section of keywords in the original file (there were a bunch of functions that were mashed together without spaces separating them, also there was one non-existant function: A_BarrelDestroye)

- Added more keywords: everything from here.

- Added some more missing keywords, basically everything inside zdoom.pk3's actors/actor.txt is now covered.

- Added some highlighting for some types used in actors/constants.txt
You do not have the required permissions to view the files attached to this post.
User avatar
Nash
 
 
Posts: 17319
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: DECORATE language configuration for Notepad++

Post by Nash »

Here's my latest language definition for the latest version of Notepad++ released this month (6.3.2). I've added more missing keywords, and also folder highlighting now finally works properly (the issues I demonstrated in my images in the posts above are gone).

Requires Notepad++ 6.3.2.

Note that with 6.3.2, they've changed the menus a bit, so to import this .XML file, you now have to go to Language -> Define your language then click the Import button.
You do not have the required permissions to view the files attached to this post.
Last edited by Nash on Fri Apr 26, 2013 8:31 pm, edited 3 times in total.
User avatar
GFD
Posts: 343
Joined: Mon May 31, 2010 7:42 pm
Location: Canada

Re: DECORATE language configuration for Notepad++

Post by GFD »

You've done a wonderful job fixing up my 5 minute config! Thank you very a lot much

Return to “Editing (Archive)”