Rt, the file suffixed with ejs has seen falsefalsesublime-ejs road GitHub, but it can only highlight between & lt ;%%& gt; in html, in addition, I do not know which rt should be put after decompression, and the file suffixed with ejs
Falsefalse/sublime-ejs GitHub
But he can only highlight the content between <%> in html, and I don't know where to put the content after decompression: I use sublime 3. I don't know if 2 has this function. I use sublime 3. I don't know if 2 has this function.
After setting as follows
~ Generate HTML. sublime-settings in the/. config/sublime-text-3/Packages/User directory. The content is as follows:
At present, there is a suitable plug-in Sublime Text 3.
- Install Babel
- Install EJS2
(EJS2 depends on the Babel plug-in. You need to install these two plug-ins at the same time)
Setting Process: View-> Syntax-> EJS2-> <%> or ( , <$ >,< @> ).
Shown as follows:
I am the principal.
Finally, I gave up the idea of making the file with the suffix ejs highlighted. Instead, I used html as the suffix.
In this way, the html rules can be highlighted in Sublime.
Declare the suffix html, not the code of ejs:
EJS.config({ext:'.html'})
Add a line in % APPDATA %/Packages/HTMLpackages/HTML. tmLanguage Ejs And restart Sublime Text 2 (as to where to add it, you will know it immediately after opening the file ), similarly, if we want Sublime Text 2 to apply a default syntax to files with any extension, we only need to find the package corresponding to the syntax and add the extension to the configuration.