Syntax Highlighting
Enabling conkyrc syntax highlighting
Gedit
Note: this highlights syntax only and does NOT attempt to validate arguments or keywords. It is unlikely to be 100% accurate, and improvements are welcome.
Syntax highlighting is automatically applied to files with conky in their
name, for example my_config.conky. Unfortunately, it also matches the
conky.lang file itself, which you should set to XML manually.
Developers: the main context (id="conkyrc") is where gedit starts. That
context then references other subcontexts. Each context can apply styles to
itself, to substrings matched by its regular expressions, or to its contents in
the case of <start><end> container contexts. If anything is unclear, search
the gtksourceview docs for the relevant XML attributes. If you run into
a particularly complex regex, try the Regex Tester linked above, and keep in
mind that gtksourceview adds some extra regex syntax, such as \%[ ... ]
and \%{ ... }.
For medit v1.1.1:
/usr/share/medit/language-specs/conky.lang
For older versions of medit:
/usr/share/medit-1/language-specs/conky.lang
For gedit v2.x:
/usr/share/gtksourceview-2.0/language-specs/conky.lang
or, for a single user:
~/.local/share/gtksourceview-2.0/language-specs/conky.lang
For gedit v3.x:
/usr/share/gtksourceview-3.0/language-specs/conky.lang
or, for a single user:
~/.local/share/gtksourceview-3.0/language-specs/conky.lang