WML Syntax Highlighting for Kate/KWrite
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.
WML Syntax Highlighting for Kate/KWrite
Note: the WML syntax highlighting schema is currently included with the upstream version of Kate under Markup/Wesnoth Markup Language, so you shouldn’t need to download anything unless you are using a very old version of the editor. If you do, grab lua.xml, pango.xml and wml.xml from the directory in the Kate git repository.
-- shadowmaster
The original first post for this topic follows:
-- shadowmaster
The original first post for this topic follows:
Spoiler:
Last edited by tvynr on November 15th, 2006, 1:29 am, edited 1 time in total.
Setting up default indenter for file types in KWrite
I found this little article which may be helpful to people who want KWrite to automatically use indentation on WML files as I do. Here's a summary of the steps involved.
1. Choose Settings -> Configure Editor
2. Click "Filetypes" on the left-hand menu
3. Press the "new" button in the upper right
4. Set the following in the visible fields:
Name: WML
Section: Markup
Variables: kate: indent-mode normal;
File extensions: *.cfg
5. Press OK. You're finished.
After completing these steps, KWrite will be set to "normal" indentation mode for WML files.
1. Choose Settings -> Configure Editor
2. Click "Filetypes" on the left-hand menu
3. Press the "new" button in the upper right
4. Set the following in the visible fields:
Name: WML
Section: Markup
Variables: kate: indent-mode normal;
File extensions: *.cfg
5. Press OK. You're finished.

After completing these steps, KWrite will be set to "normal" indentation mode for WML files.
Re: WML Syntax Highlighting for KWrite (v0.30)
This seemed to be a kind of abandoned project, and I needed to boost up the WML syntax highlighting features for my text editor, Kate.
Thus I decided to publish a new release under my own terms
which are identical to the old ones. I just added some new features and bumped the version number. They are:

Thus I decided to publish a new release under my own terms

- wmlindent, wmllint and wmlscope control tags are recognized and marked just as the TODO, HACK, FIXME, etc. alerts are.
- .pbl files are automatically recognized as WML sources.
- It is now possible to comment/uncomment blocks with CTRL-D/CTRL-SHIFT-D just like with other syntax highlighters.
- #textdomain and #ifndef are highlighted as preprocessor directives.

- Attachments
-
wml-0.36-kate.xml.gz
- 0.36 version of Kate WML syntax highlighting info (unofficial release by shadowmaster)
- (1.59 KiB) Downloaded 784 times
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Re: WML Syntax Highlighting for KWrite (v0.36)
NICE!
Thank you.
I use Kate, too.
Yesterday I installed the old version, and now...
Jovycos
Thank you.
I use Kate, too.
Yesterday I installed the old version, and now...
Jovycos
Full of Nerdiness...
Re: WML Syntax Highlighting for Kate/KWrite (v0.36)
Sorry, but i couldn't make it work.
I copied the file, open a .cfg file and nothing happened. I touched around tools --> highlight, but I wouldn't find WML among the list.
I copied the file, open a .cfg file and nothing happened. I touched around tools --> highlight, but I wouldn't find WML among the list.
That's ridiculous, dragons have no windows...
-
- Translator
- Posts: 61
- Joined: February 5th, 2007, 4:17 pm
- Location: Brunswick, Germany
Re: WML Syntax Highlighting for Kate/KWrite (v0.36)
Are you sure you copied it to ~/.kde/share/apps/katepart/syntax/ path, as stated? E.g. the first time I toyed with highlighters, I've made an error with .../kate/... instead of .../katepart/... in the path.
Then, did you restart Kate after copying the highlighter? Gotta do that.
Then, did you restart Kate after copying the highlighter? Gotta do that.
Chusslove Illich (Часлав Илић)
Re: WML Syntax Highlighting for Kate/KWrite (v0.36)
Nope way....
I found out that I was copying not in my user folder, but in the system's, at /katepart. I went to .kde/share/apps/ but there I found no /katepart, only /kate. I created /katepart and copied the fil, but still. Maybe is an issue of the version or something. I'm using Kate 2.5.7 at KDE 3.5.7
I found out that I was copying not in my user folder, but in the system's, at /katepart. I went to .kde/share/apps/ but there I found no /katepart, only /kate. I created /katepart and copied the fil, but still. Maybe is an issue of the version or something. I'm using Kate 2.5.7 at KDE 3.5.7
That's ridiculous, dragons have no windows...
Re: WML Syntax Highlighting for Kate/KWrite (v0.36)
doesn't work for me either, in either place
places being
/usr/share/apps/katepart/syntax/wml.xml
.kde/share/apps/kate/wml.xml
places being
/usr/share/apps/katepart/syntax/wml.xml
.kde/share/apps/kate/wml.xml
Re: WML Syntax Highlighting for Kate/KWrite (v0.36)
I install it at $HOME/.kde/share/apps/katepart/syntax/wml.xml, and my local user-wide KDE directory installation would be at /opt/kde3/share/apps/katepart/syntax/wml.xml, if I did it.AI wrote:doesn't work for me either, in either place
places being
/usr/share/apps/katepart/syntax/wml.xml
.kde/share/apps/kate/wml.xml
You might want to search for the location where all the other syntax highlighting definition files are stored in your system (c.xml, xml.xml...).
I'm at the moment working on making collapsable WML blocks, and I have already implemented it for [nodes][/nodes], but I plan to make it possible too for #define #enddef and #if*def #endif blocks.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Re: WML Syntax Highlighting for Kate/KWrite (v0.36)
Still not working.
It does recognize the script (it's in the list), but all WML files are seen as "Scripts/Quake Script".
Actually, syntax colouring just worked for a second before everything went black again....
It does recognize the script (it's in the list), but all WML files are seen as "Scripts/Quake Script".
Actually, syntax colouring just worked for a second before everything went black again....
Re: WML Syntax Highlighting for Kate/KWrite (v0.36)
Ah yes, that problem.AI wrote:Still not working.
It does recognize the script (it's in the list), but all WML files are seen as "Scripts/Quake Script".
Actually, syntax colouring just worked for a second before everything went black again....
Remove the .cfg file extension from the Quake Script highlighting settings in Kate. That should make WML take over all .cfg files.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Re: WML Syntax Highlighting for Kate/KWrite (v0.36)
Still nothing. I found the place where all syntax files are, in usr/share/apps/katepart/syntax, but, after copying the file there, I can't see any significant change. In the submenu "File Type" I can select WML, but there is no WML entry in highlighting lists. May there be something lacking on the file, like some definitions on the header or something?
That's ridiculous, dragons have no windows...
Re: WML Syntax Highlighting for Kate/KWrite (v0.36)
Please tell me if you can see this:
http://i144.photobucket.com/albums/r176 ... tings3.png
And whether you did this:
http://i144.photobucket.com/albums/r176 ... tings2.png
And this:
http://i144.photobucket.com/albums/r176 ... tings1.png (the MIME type setting being optional).
This later step is nice but optional too:
http://i144.photobucket.com/albums/r176 ... tings4.png
http://i144.photobucket.com/albums/r176 ... tings3.png
And whether you did this:
http://i144.photobucket.com/albums/r176 ... tings2.png
And this:
http://i144.photobucket.com/albums/r176 ... tings1.png (the MIME type setting being optional).
This later step is nice but optional too:
http://i144.photobucket.com/albums/r176 ... tings4.png
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Re: WML Syntax Highlighting for Kate/KWrite (v0.36)
The first fixes things for the file I'm editing (permantently, it seems), but only for that file. The rest has no effect.