Re: gedit/gtksourceview trouble making new language-spec

2011-01-02 Thread M Watts

On 12/31/2010 05:07 PM, Ed Greenberg wrote:


I now have the beginnings of highlighting, so I can learn how to
highlight additional parts of the file.



Glad it's now working!  If you run into problems, try also asking on 
[email protected]; there's more traffic.

___
gnome-devtools mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-devtools


Re: gedit/gtksourceview trouble making new language-spec

2010-12-30 Thread Ed Greenberg

On 12/31/2010 12:47 AM, M Watts wrote:

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.



text/x-ael
*.ael
//
/*
*/

snip---


Try starting the .lang file with:


I had this in the file, but not in the email. (Should have put a 
---snip--- above my fragement, as well as below.)


mimetypes="text/x-ael">

Got it working!

1. Turns out that running gedit from the command line produces error 
messages related to the opening and parsing of the .lang file.


2. Errors indicated first that  the mimetypes attribute referenced above 
is not valid in the language ID.


3. After fixing that, the remaining error was: (gedit:7443): 
GtkSourceView-WARNING **: Failed to load 
'/home/edg/.local/share/gtksourceview-2.0/language-specs/ael.lang': 
Missing main language definition (id = "ael".)


The resolution to this was down lower in the file, where we had id="c">. This seems to be the "main language definition." There needs to 
be one for "ael", not for "c".


I now have the beginnings of highlighting, so I can learn how to 
highlight additional parts of the file.


Thanks to Mr. Watts for getting me going.

Ed Greenberg
Austin, TX
___
gnome-devtools mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-devtools


Re: gedit/gtksourceview trouble making new language-spec

2010-12-30 Thread M Watts

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.


text/x-ael
*.ael
//
/*
*/

snip---


Try starting the .lang file with:



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

___
gnome-devtools mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-devtools