问题
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..
回答1:
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).
来源:https://stackoverflow.com/questions/22871014/sublime-text-multiple-language-syntax-highlight