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
SigurdFireDragon
Developer
Posts: 546
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 619 times
Wesnoth (WML) 2018-10-08.7z
(9.77 KiB) Downloaded 399 times
Wesnoth (WML) 2018-04-19.zip
(10.75 KiB) Downloaded 429 times
Wesnoth (WML) 2017-10-19.7z
(9.68 KiB) Downloaded 438 times
Wesnoth (WML) 2017-07-14.7z
(9.71 KiB) Downloaded 448 times
Wesnoth (WML) 2017-04-16.7z
(9.65 KiB) Downloaded 440 times
Wesnoth (WML) 2017-01-14.7z
(9.5 KiB) Downloaded 458 times
Last edited by SigurdFireDragon on April 16th, 2017, 4:38 pm, edited 3 times in total.
Co-Author of Winds of Fate
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: 382
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
SigurdFireDragon
Developer
Posts: 546
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

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

Post by SigurdFireDragon »

You're welcome :)
Co-Author of Winds of Fate
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: 110
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.
SigurdFireDragon
Developer
Posts: 546
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
Co-Author of Winds of Fate
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: 476
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.
SigurdFireDragon
Developer
Posts: 546
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

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

Post by SigurdFireDragon »

You're welcome :)
Co-Author of Winds of Fate
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: 44
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*
SigurdFireDragon
Developer
Posts: 546
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.
Co-Author of Winds of Fate
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