Sigurd's WML Syntax Highlighting for Notepad++

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
SigurdFireDragon
Developer
Posts: 501
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Sigurd's WML Syntax Highlighting for Notepad++

Post by SigurdFireDragon »

Here's my Notepad++ wml syntax highlighter. It's based off of a previous wml file from the forums, with some changes.
The colors used are based on what colors Notepad++ uses for similar concepts in C++, Lua, and Python.

To use, you must have a Notepad++ version that has at least v2.1 of User Defined Language.
Just download the attached file & extract the .xml file with a .7z compatible program.
Then in Notepad++ >> 'Language' menu >> 'Define your language...' option >> click the 'import' button and point it to the .xml file.

Quirks:
Using Notepad++'s toggle comments command adds a '##' to indicate a comment. This hack was necessary to get colors for other highlighting working. Comments can also be indicated with the standard single #.

Some keywords/tags are missing from the list. Please PM any that are missing, and they will get added at some point.

Comments and questions welcome. There are some additional things I wanted to do with this, but they will have to wait for a future version of the Notepad++ UDL.

I will occasionally update this file with new keywords and such.

Screenshots:
Spoiler:
Attachments
Wesnoth (WML) 2019-01-14.7z
(9.81 KiB) Downloaded 200 times
Wesnoth (WML) 2018-10-08.7z
(9.77 KiB) Downloaded 147 times
Wesnoth (WML) 2018-04-19.zip
(10.75 KiB) Downloaded 186 times
Wesnoth (WML) 2017-10-19.7z
(9.68 KiB) Downloaded 185 times
Wesnoth (WML) 2017-07-14.7z
(9.71 KiB) Downloaded 192 times
Wesnoth (WML) 2017-04-16.7z
(9.65 KiB) Downloaded 191 times
Wesnoth (WML) 2017-01-14.7z
(9.5 KiB) Downloaded 203 times
Last edited by SigurdFireDragon on April 16th, 2017, 4:38 pm, edited 3 times in total.
Maintainer of Wings of Valor
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
User avatar
Nikitaw99
Posts: 26
Joined: September 6th, 2016, 8:19 pm

Re: Sigurd's WML Syntax Highlighting for Notepad++

Post by Nikitaw99 »

Seems interesting. I'll surely download this!
Hello world!
User avatar
Samonella
Posts: 374
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Sigurd's WML Syntax Highlighting for Notepad++

Post by Samonella »

I've been using this for quite a while and just want to say thanks, it's made writing wml much easier!
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
User avatar
SigurdFireDragon
Developer
Posts: 501
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Sigurd's WML Syntax Highlighting for Notepad++

Post by SigurdFireDragon »

You're welcome :)
Maintainer of Wings of Valor
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
User avatar
Jarom
Posts: 78
Joined: January 4th, 2015, 8:23 pm
Location: Green Isle, Irdya or Poland, Earth - I'm not quite sure

Re: Sigurd's WML Syntax Highlighting for Notepad++

Post by Jarom »

Lot of good job done here, thank you, SigurdFireDragon. editor_name and help_topic_text are missing, but they are so rarely used that it's not a problem at all. I appreciate it even more, because I tried to do that myself and my list was always incomplete.
User avatar
SigurdFireDragon
Developer
Posts: 501
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Sigurd's WML Syntax Highlighting for Notepad++

Post by SigurdFireDragon »

Thanks, I'll be sure to add those on the next update
Maintainer of Wings of Valor
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
Whiskeyjack
Posts: 474
Joined: February 7th, 2015, 1:27 am
Location: Germany

Re: Sigurd's WML Syntax Highlighting for Notepad++

Post by Whiskeyjack »

Thanks a ton, Sigurd!

Discovering this made my life so much easier - I was thinking about postponing all other Wesnoth stuff just to write my own version, when I came across this thread! :-)

I fiddled a little with the colors to adapt it to dark mode, but that was the easy part.
Under blood-red skies, an old man sits
In the ruins of Carthage - contemplating prophecy.
User avatar
SigurdFireDragon
Developer
Posts: 501
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Sigurd's WML Syntax Highlighting for Notepad++

Post by SigurdFireDragon »

You're welcome :)
Maintainer of Wings of Valor
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
User avatar
mercurius999
Posts: 41
Joined: February 23rd, 2010, 1:29 pm

Re: Sigurd's WML Syntax Highlighting for Notepad++

Post by mercurius999 »

Hello and thanks for the Notepad++ file!

Just one comment: why did you specified the background color too? It results very badly unless you use a default white background. I suppose you can specify the background as transparent or none or defualt.

I'm a fan of darkthemed editors :)

m*
User avatar
SigurdFireDragon
Developer
Posts: 501
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Sigurd's WML Syntax Highlighting for Notepad++

Post by SigurdFireDragon »

mercurius999 wrote: August 31st, 2020, 10:22 am Just one comment: why did you specified the background color too? It results very badly unless you use a default white background. I suppose you can specify the background as transparent or none or defualt.
Hadn't occurred to me when I first made it. I'll see about doing transparent/none/default for background in the next version.
Maintainer of Wings of Valor
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
Post Reply