Sublime Text 2 How to make Ejs template syntax highlighting?

Source: Internet
Author: User
Keywords Falsefalse ejs sublime github html
Tags sublime text
RT, a file with the suffix named Ejs
See Falsefalse/sublime-ejs Road GitHub , but he can only let the HTML inside the <%%> between the highlight, and I do not know where to put after decompression

Reply content:

I'm using sublime 3, I don't know 2 has this function not I'm using sublime 3, I don't know 2 has this function not

After you set the mode
The ~/.config/sublime-text-3/packages/user directory generates html.sublime-settings with the following content:
Currently there is a suitable plugin under sublime Text 3.
    • Install Babel
    • Install EJS2
(EJS2 relies on the Babel plug-in, which requires both plugins to be installed)
Setup process: view->syntax->ejs2-><%%> or ( , <$ $>, <@ @>).
Shown below:
I'm asking the Lord.
In the end, I gave up the idea of highlighting a file with the suffix named Ejs, instead of using HTML as the suffix name.
So that in the sublime can be in accordance with the HTML rules to highlight
Declares that the suffix is named HTML instead of the EJS code:
EJS.config({ext:'.html'})
Add a row in%appdata%/packages/htmlpackages/html.tmlanguage Ejs and restart Sublime Text 2 (as for where to add, open the file you will soon know), the same reason if we want to sublime Text 2 to any other extension of the file to apply a default syntax only need to find the syntax corresponding to the package and add the extension in the configuration.
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.