WML Syntax Highlighting for Gedit
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 Gedit
Attached is a syntax highlighting definition for Gedit (and any other app which uses GtkSourceView for syntax highlighting). The contents of the tarball should be placed in the ~/.gnome2/gtksourceview-1.0/language-specs/ directory to function properly.
Sadly, this syntax highlighting definition lacks the more complex features presented in the KWrite syntax highlighting definition. This is due in large part to the fact that I could not find any documentation on how to write GtkSourceView .lang files and had to create this one based almost entirely upon examining the ones which already exist on my system; as a result, I don't have any information on how to handle things like nested macro calls (such as "{FOO ({BAR})}") and the like. If anyone can provide me with a good howto or spec on the GtkSourceView .lang format, I will happily revisit the task. Otherwise, I'm not sure how much more I can improve this highlighting, but I suppose it's better than nothing.
Note also that I was unable to find any information on how to associate a given .lang file with a specific file extension (only MIME types, which I'm pretty sure Wesnoth Markup Language does not have). So to activate highlighting on a specific file, select View :: Highlight Mode :: Markup :: Wesnoth Markup Language.
Cheers!
Sadly, this syntax highlighting definition lacks the more complex features presented in the KWrite syntax highlighting definition. This is due in large part to the fact that I could not find any documentation on how to write GtkSourceView .lang files and had to create this one based almost entirely upon examining the ones which already exist on my system; as a result, I don't have any information on how to handle things like nested macro calls (such as "{FOO ({BAR})}") and the like. If anyone can provide me with a good howto or spec on the GtkSourceView .lang format, I will happily revisit the task. Otherwise, I'm not sure how much more I can improve this highlighting, but I suppose it's better than nothing.
Note also that I was unable to find any information on how to associate a given .lang file with a specific file extension (only MIME types, which I'm pretty sure Wesnoth Markup Language does not have). So to activate highlighting on a specific file, select View :: Highlight Mode :: Markup :: Wesnoth Markup Language.
Cheers!
- Attachments
-
wml.lang.tar.bz2
- WML syntax highlighting definition for Gedit v1.0.
- (865 Bytes) Downloaded 710 times
-
- Posts: 719
- Joined: December 9th, 2003, 9:31 pm
- Contact:
-
- Posts: 126
- Joined: April 19th, 2008, 7:12 pm
- Contact:
Re: WML Syntax Highlighting for Gedit
Is there any chance of rewriting it for gtksourceview 2?