Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can I add in the regular expressions for an additional syntax language?

share|improve this question
    
Be more specific, what text editor are you talking about? Gedit? –  enzotib Aug 2 '11 at 12:43
    
You should tell us, which editor you use; gedit, mcedit, scite? And if you tell us the language, maybe we know, where to get a syntax file. –  user unknown Aug 2 '11 at 12:46
1  
The language is actually a highlighting scheme for a text file. We invented it so it does not exist anywhere. The editor is the default editor that comes with Ubuntu. It just says Text Editor, but in Help About it says gedit. –  George Bailey Aug 2 '11 at 13:56
add comment

2 Answers 2

up vote 5 down vote accepted

Gedit (the default text editor) using GTKSourceView for it's syntax highlighting. It uses XML files to define how to highlight different syntax.

There is a tutorial and a reference document on the GTKSourceView site. Finished source file definitions are stored in /usr/share/gtksourceview-2.0/language-specs/, you might want to check them out to learn by example.

There is also a less in depth tutorial on the Gedit site.

share|improve this answer
add comment

I assume you are talking about gedit (labeled as "text editor" in the ubuntu menu).

Here is everything you need to know.

Basically you have to create a new language definition for GtkSourceView, which is the syntax highlighting component used by gedit.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.