Visual Studio Code for .cfm文件的自动格式 [英] Auto Format on Visual Studio Code for .cfm files
问题描述
有人知道在 VSCode 上是否可以自动格式化ColdFusion documents
的方法吗?
Does anyone know if there's a way to auto format ColdFusion documents
on VSCode the way it does for HTML files
?
推荐答案
自动格式化HTML,JS& CFM/CFML文件中的CSS?
Auto format HTML, JS & CSS within CFM/CFML files?
如果需要,可以安装美化,然后添加cfc ,cfm和& cfml作为settings.json文件中的语言.之后,您可以使用美化选择"或美化文件"来修改代码.如果插件无法确定您要格式化的代码类型,它将提示您输入"HTML,JS或CSS". (我已分配了一个快捷方式,因此不必按CTRL + SHIFT + P来搜索美化"选项.)
If you want, you can install the Beautify and then add cfc, cfm, & cfml as languages in the settings.json file. After that, you can use "Beautify Selection" or "Beautify File" to modify code. If the plugin can't decide what type of code you are formatting, it will prompt you for "HTML, JS or CSS". (I've assigned a shortcut so I don't have to press CTRL+SHIFT+P to search for the the beautify option.)
SETTINGS.JSON
"beautify.config" : {
"beautify.language": {
"js": ["js","json","cfc"],
"css": ["css", "scss"],
"html": ["htm", "html", "cfml", "cfm"]
},
"html": {
"allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg", "cfm", "cfml"]
}
}
这篇关于Visual Studio Code for .cfm文件的自动格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!