I use meld for graphical diff comparisons.
I would like to associate .tpp as a C++ source file for syntax highlighting purposes.
How do I do this?
I use meld for graphical diff comparisons.
I would like to associate .tpp as a C++ source file for syntax highlighting purposes.
How do I do this?
Meld uses the Gnome project's GtkSourceView component for syntax highlighting.
In order to change the file associations, edit the following file:
/usr/share/gtksourceview-3.0/language-specs/cpp.lang
Edit the "globs" section under language/metadata/property and add ;*.tpp
<property name="globs">*.cpp;*.cxx;*.cc;*.C;*.c++;*.tpp</property>
^^^^^^
You can create custom lang files in
~/.local/share/gtksourceview-3.0/language-specs/
If the directory does not already exist, you can create it. Then copy the lang file you want to use as a template from
/usr/share/gtksourceview-3.0/language-specs/
/usr/share/gtksourceview-3.0/language-specs/javascript.langlists*.js;*.nodein the globs, yet Meld highlights.mjsfiles just fine. – Dan Dascalescu Jan 09 '19 at 02:44C:\Program Files (x86)\Meld\share\gtksourceview-3.0\language-specs(for Meld 3.20.4). – kwc Oct 16 '21 at 01:22