2014-10-09 52 views
0

我正在寻找具有自动格式ejs文件功能的包。我已经安装了HTMLPrettify。是否可以添加ejs作为html格式,以便将其格式化为html代码?这对我的目的来说就足够了。用于ejs格式化的Sublime Text 2包

回答

6

添加到.jsbeautifyrc文件allowed_file_extensions “EJS”:

{ 
"html": { 
"allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg", "ejs"], 
"brace_style": "collapse", // "expand", "end-expand", "expand-strict" 
"indent_char": " ", 
"indent_handlebars": false, // e.g. {{#foo}}, {{/foo}} 
"indent_inner_html": false, 
"indent_scripts": "keep", // "separate", "normal" 
"indent_size": 4, 
"max_preserve_newlines": 10, 
"preserve_newlines": true, 
"unformatted": ["a", "sub", "sup", "b", "i", "u", "pre"], 
"wrap_line_length": 0 
}, ... 
+0

感谢,这为我工作。 – Reza 2015-10-06 04:34:11

+0

这在ST3中也适用于我。 – 2017-03-01 18:16:30