Question

Is there something like multiple language highlight syntax in Sublime Text? For example my code might look like this:

{% extends "template.html" %}
{% block content %}
   {% if task == 'archimed_spiral' %}
       <p> 
           $\frac{2}{3}$
       </p>

   {% elif task == 'gcd' %}
   {% endif %}
{% endblock %}

Which is LaTeX inside html inside Jinja2. It gets pretty hard to read it properly. Note I know about Jinja2 package for Sublime, so it does highlight Jinja2 + html. Maybe I am just asking for too much..

Was it helpful?

Solution

Yes you can embed syntax highlighting. You basically define a start and end pattern, then include an existing scope. See Sublime Text 2: Different language highlighting based on context? (a la Webstorm).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top