Answer the question
In order to leave comments, you need to log in
How to make sublime support html syntax in php documents?
Such a problem - if you enable html syntax in a php document, the php highlighting and all php snippets are turned off, and if you put php, then html snippets stop working, which is very inconvenient.
Can this problem be solved somehow?
Answer the question
In order to leave comments, you need to log in
Snippets are written for a specific scope. If you do not specify it, then the snippet will work in any scope. And with highlighting, everything should be fine, I just went in, I don’t have any themes, everything is well highlighted, php and html.
Here is a snippet for example:
<snippet>
<content><![CDATA[
<script type="text/javascript" src="./js/${1}"></script>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>jslink</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.html(.basic)</scope>
</snippet>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question