WML Syntax Highlighting for KWrite

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
tvynr
Posts: 49
Joined: March 21st, 2006, 6:11 pm

WML Syntax Highlighting for KWrite

Post by tvynr »

Hey, all. We just started working with the Wesnoth system to make an add-on and we are having a fantastic time of it! Having tried to mod other games in the past (Diablo II, for instance), I must say that the modularity and flexibility of this program is nothing short of astonishing.

That said, we've found ourselves editing quite a lot of WML over the past day or two. We've also found ourselves sitting for twenty minutes staring at a text file until we realized we were missing a quotation mark. As a result, I took some time today to investigate the color highlighting system for KWrite (since both of our development machines are Debian boxes running KDE). If you're a Linux user and want syntax-highlighting, you might get some use out of this file. :) Just pop it into your ~/.kde/share/apps/katepart/syntax directory and open a .cfg file.

Note that this file has a high priority setting so that it overrides the Quake syntax highlighting that ships with Debian's KWrite package. Also, note that I just threw this together a couple hours ago and so it hasn't been very thoroughly tested. If you use it and find something wrong with it, please e-mail me or post here.

Cheers!
Attachments
wml.xml.tar.bz2
KWrite syntax highlighting definition for WML file format.
(176 Bytes) Downloaded 317 times
Last edited by tvynr on November 1st, 2006, 11:17 pm, edited 1 time in total.
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Post by Sapient »

Cool, thanks. 8)
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
tvynr
Posts: 49
Joined: March 21st, 2006, 6:11 pm

Post by tvynr »

Update: fixed two small syntax highlighting bugs: nested macros now highlight properly, as do comments.
Attachments
wml.xml.tar.bz2
KWrite syntax highlighting definition for WML file format.
(176 Bytes) Downloaded 294 times
WildPenguin
Posts: 161
Joined: September 6th, 2005, 10:41 pm
Location: Australia

Post by WildPenguin »

It seems you've attached the the wrong file:

Code: Select all

% file wml.xml
wml.xml: broken symbolic link to `/static/projects/wesnoth/Massive Era Project/trunk/utilities/wml.xml'
tvynr
Posts: 49
Joined: March 21st, 2006, 6:11 pm

Post by tvynr »

Both times, it would seem. I forgot to tell tar to deference the symlink. Sorry about that; thanks for pointing it out. I should look more carefully at file sizes next time.

Attached should be the real thing. :)
Attachments
wml.xml.tar.bz2
KWrite syntax highlighting definition for WML file format.
(990 Bytes) Downloaded 310 times
Post Reply