Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
28
rated 0 times [  28] [ 0]  / answers: 1 / hits: 36146  / 3 Years ago, sat, september 11, 2021, 5:11:26

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


More From » gedit

 Answers
6

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/ or /usr/share/gtksourceview-3.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.



After you create your new language spec, restart gedit and it will automatically add it to its list of languages.


[#44025] Saturday, September 11, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
utonmbo

Total Points: 134
Total Questions: 104
Total Answers: 118

Location: Argentina
Member since Mon, Jan 3, 2022
2 Years ago
;