VS代码中的EJS格式 [英] EJS Formatting in VS Code

查看:44
本文介绍了VS代码中的EJS格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,当我处于EJS文件中时,我无法自动格式化代码,没有自动缩进功能.当我将右下角的文件类型更改为HTML时,它认为标记无效并中断.有人有建议吗?

Currently I cannot autoformat my code when I am in an EJS file, no auto-indenting works. When I change the file type on the bottom right to HTML it thinks the markup is invalid and breaks. Does anyone have suggestions?

推荐答案

建议保留HTML格式化程序(或使用.ejs之类的.html)并添加到您的设置中:"html.format.unformatted":"wbr,%"

A suggestion is to keep HTML formater (or use .ejs like .html) and add to your settings : "html.format.unformatted": "wbr,%"

此后,缩进并不完全起作用,但是更好...

After that, the indentation is not completely functional, but is better...

这篇关于VS代码中的EJS格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆