DECORATE language configuration for Notepad++

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

DECORATE language configuration for Notepad++

Postby GFD » Sun Nov 04, 2012 4:06 pm

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
GFD
My brain's probably worth a lot of money!
 
Joined: 31 May 2010
Location: Canada

Re: DECORATE language configuration for Notepad++

Postby Nash » Mon Nov 05, 2012 10:12 am

Very, very useful! Thank you for this.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: DECORATE language configuration for Notepad++

Postby Zombieguy » Tue Nov 06, 2012 11:04 am

Oh yes, thanks you!
Zombieguy
 
Joined: 24 May 2010
Location: C:\Earth>

Re: DECORATE language configuration for Notepad++

Postby SFJake » Tue Nov 06, 2012 12:34 pm

So, you import it, then what?

It doesn't do anything at that point. How do you use it?
User avatar
SFJake
 
Joined: 03 Nov 2007

Re: DECORATE language configuration for Notepad++

Postby GFD » Tue Nov 06, 2012 12:41 pm

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
GFD
My brain's probably worth a lot of money!
 
Joined: 31 May 2010
Location: Canada

Re: DECORATE language configuration for Notepad++

Postby SFJake » Tue Nov 06, 2012 1:37 pm

Oh, thanks, that works.
User avatar
SFJake
 
Joined: 03 Nov 2007

Re: DECORATE language configuration for Notepad++

Postby Nash » Sat Dec 08, 2012 5:27 pm

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
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: DECORATE language configuration for Notepad++

Postby GFD » Sat Dec 08, 2012 5:30 pm

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
GFD
My brain's probably worth a lot of money!
 
Joined: 31 May 2010
Location: Canada

Re: DECORATE language configuration for Notepad++

Postby Nash » Sat Dec 08, 2012 6:05 pm

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
Attachments
dec_npp_fix2.zip
(5.34 KiB) Downloaded 60 times
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: DECORATE language configuration for Notepad++

Postby Nash » Fri Apr 26, 2013 9:13 pm

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.
Attachments
DECORATE for Notepad++ 6.3.2.zip
(6.11 KiB) Downloaded 118 times
Last edited by Nash on Fri Apr 26, 2013 9:31 pm, edited 3 times in total.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: DECORATE language configuration for Notepad++

Postby GFD » Fri Apr 26, 2013 9:16 pm

You've done a wonderful job fixing up my 5 minute config! Thank you very a lot much
User avatar
GFD
My brain's probably worth a lot of money!
 
Joined: 31 May 2010
Location: Canada


Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 6 guests