Re: gedit/gtksourceview trouble making new language-spec



On 12/31/2010 11:34 AM, Ed Greenberg wrote:
Hi Folks,  Trying to make a new language definition for gedit
(gtksourceview), I seem to be stuck.

I'd like to highlight a c-like language called "Asterisk Extension
Language."

I started by making a copy of the language-specs/c.lang file in my
~/.local/share/gtksourceview-2.0/language-specs directory, called ael.lang.
<language id="ael" _name="ael" version="0.1" _section="Sources">
<metadata>
<property name="mimetypes">text/x-ael</property>
<property name="globs">*.ael</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
----snip---

Try starting the .lang file with:

<?xml version="1.0" encoding="UTF-8"?>

<language id="ael" _name="ael" version="2.0" _section="Sources" mimetypes="text/x-ael">

See also:

http://library.gnome.org/devel/gtksourceview/2.10/lang-tutorial.html
http://library.gnome.org/devel/gtksourceview/2.10/lang-reference.html



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]