15 June 2012 at 03:29 #1912
I’d like to request syntax highlighting for AutoIt (http://www.autoitscript.com). There is already plenty of syntax highlighting files out there for the language, it would simply be a matter of tweaking the format of one of these files to match whatever format your lexer uses.
Thanks!18 June 2012 at 15:57 #1914
the syntax highlighting languages come from the library
in version 2.x (for gtk 2.x) then it should be possible to add new languages reading the documentation. I’ll add to the TODO list but don’t know when I’ll have time to take care.
Cheers.19 June 2012 at 03:29 #1921
Actually, I found a syntax file for gtksourceview already created. However, I can’t figure out how to get the new option to show up in cherrytree. Is there some file I have to edit or is it hardcoded?
AutoIt lang file – http://www.autoit.de/index.php?page=Thread&threadID=1267019 June 2012 at 23:41 #1925
The list of available languages comes directly from a call to the library at application start. I’s not hardcoded and there’s no file to edit. All you have to do is to add the language to the installed library (I can’t help you with this now), cherrytree will then see it and list it.30 October 2018 at 16:14 #125025
I am trying to track down a LANG file for Au3 (AutoIT), so I can add it to CherryTree.
I came across this thread and I have tried the above link, but it would appear that that thread is no longer accessible.
Could someone please let me know if there is a current LANG file which I can use?
Barry.30 October 2018 at 16:33 #125026
Extra GtkSourceView language definitions
Language Definition v2.0 Tutorial
A AutoIt 3 language definition file
Cass aka Acry17 January 2019 at 12:56 #125190
don’t know if you are still interested in the language definition of AutoIt, but:
The language definition file I posted before is from highlight, which I use for Shell-Syntax-Highlighting. It is now hosted here:
Both language definition file (ldf) formats use Regular Expressions, but you do not have to mess with them, just copy and paste. It’s really just the layout of the file.
I contacted the author André Simon asking for a convert script, waiting for an answer.
Today I used a sourceview4 ldf (markdown) in pygtksourceview2.
GtkSourceView 2, 3 and 4 have the same language definition file format.
So either you put the ldf in a path reachable for pygtksourceview2 or CT’s source need a slight change:
You have to preserve the Gtk.SourceLanguageManager’s original search path when you add your own.
Append to it instead of replacing it.
I provide the language file in the demodir.
The relevant code is:
lm = gtksourceview2.LanguageManager() pathes = lm.get_search_path() path = DEMODIR pathes.append(path) lm.set_search_path(pathes) id = lm.get_language('markdown') self.inbuffer.set_language(id) self.inbuffer.set_highlight_syntax(True)
You must be logged in to reply to this topic.