How can I tell Gedit which syntax highlighting to apply?

TRiG

For some godforsaken reason, Twig files in our source code are saved with a .html extension, instead of a .twig extension. I followed guidelines to add custom highlighting to Gedit, and the Twig highlighter I found does attach to .html files (with <property name="globs">*.twig;*.html;</property>). However, the inbuilt HTML highlighter also attaches to .html files (with <property name="globs">*.html;*.htm</property>). This is the ruleset that Gedit uses for .html files (possibly because html.lang is earlier alphabetically than twig.lang).

I don’t often edit either HTML or Twig, so I don’t need some sort of automated solution which works out what type of file it really is and applies the correct highlighting. Picking the highlighting from a Preferences menu would be sufficient. Is there any way to do that?

Basically, when I open a .html file, I want a way to tell Gedit that this file is actually Twig.

Ziazis

Yes you can go to

View -> Highlight mode -> Select which one you need

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Can I set a default syntax highlighting in Gedit?

From Dev

Can I set a default syntax highlighting in Gedit?

From Dev

How can I display syntax highlighting on a file?

From Dev

How can I tell which HubSection is selected

From Dev

How can I tell which commands are deprecated?

From Dev

Custom gedit Syntax Highlighting for Dummies?

From Dev

Modifying a gedit syntax highlighting file

From Dev

How to add a new language definition for syntax highlighting in Gedit?

From Dev

How to add a new language definition for syntax highlighting in Gedit?

From Dev

How can I add a "::" operator to my VIM syntax highlighting file?

From Dev

How can I enable syntax highlighting in a Python file without an extension?

From Dev

How can I properly group user defined variables for syntax highlighting?

From Dev

How can I print PHP syntax highlighting on a colour printer?

From Dev

How can I tell which user limit I am running into?

From Dev

How can I tell which version of Varnish I'm running?

From Dev

How can I tell which VNC package I'm using?

From Dev

How do I apply darkTheme in gedit?

From Dev

How can I tell which DNS servers DNSMasq is using?

From Dev

How can I tell which reference is adding a permission in Xamarin Android?

From Dev

How can I tell which button in a repeater got pressed?

From Dev

How can I tell which constructor to use on an inner (member) class?

From Dev

How can I tell which IDE an Android project was made with?

From Dev

How can i tell PyCUDA which GPU to use?

From Dev

How can I tell which network interface my computer is using?

From Dev

How can I tell which DNS servers DNSMasq is using?

From Dev

How can I tell which CPU my application runs on windows

From Dev

How can I tell which of the two forms is submitted in Django?

From Dev

How can I tell which console opened the script?

From Dev

How can I tell which web server Zimbra 8.0.6 is running?

Related Related

  1. 1

    Can I set a default syntax highlighting in Gedit?

  2. 2

    Can I set a default syntax highlighting in Gedit?

  3. 3

    How can I display syntax highlighting on a file?

  4. 4

    How can I tell which HubSection is selected

  5. 5

    How can I tell which commands are deprecated?

  6. 6

    Custom gedit Syntax Highlighting for Dummies?

  7. 7

    Modifying a gedit syntax highlighting file

  8. 8

    How to add a new language definition for syntax highlighting in Gedit?

  9. 9

    How to add a new language definition for syntax highlighting in Gedit?

  10. 10

    How can I add a "::" operator to my VIM syntax highlighting file?

  11. 11

    How can I enable syntax highlighting in a Python file without an extension?

  12. 12

    How can I properly group user defined variables for syntax highlighting?

  13. 13

    How can I print PHP syntax highlighting on a colour printer?

  14. 14

    How can I tell which user limit I am running into?

  15. 15

    How can I tell which version of Varnish I'm running?

  16. 16

    How can I tell which VNC package I'm using?

  17. 17

    How do I apply darkTheme in gedit?

  18. 18

    How can I tell which DNS servers DNSMasq is using?

  19. 19

    How can I tell which reference is adding a permission in Xamarin Android?

  20. 20

    How can I tell which button in a repeater got pressed?

  21. 21

    How can I tell which constructor to use on an inner (member) class?

  22. 22

    How can I tell which IDE an Android project was made with?

  23. 23

    How can i tell PyCUDA which GPU to use?

  24. 24

    How can I tell which network interface my computer is using?

  25. 25

    How can I tell which DNS servers DNSMasq is using?

  26. 26

    How can I tell which CPU my application runs on windows

  27. 27

    How can I tell which of the two forms is submitted in Django?

  28. 28

    How can I tell which console opened the script?

  29. 29

    How can I tell which web server Zimbra 8.0.6 is running?

HotTag

Archive