[英]How can I make Visual Studio Code recognize html, php and javascript all in one file?
I started using Visual Studio Code and I have noticed that it recognizes only one language at a time. 我开始使用Visual Studio Code,我注意到它一次只能识别一种语言。 Is there a way to change that so that I can have 3 recognized languages (HTML, JavaScript, PHP) all in the same .php file?
有没有一种方法可以更改,以便我可以在同一.php文件中全部使用3种公认的语言(HTML,JavaScript,PHP)?
So I can get colors and snippets and such for all 3 languages at the same time 这样我就可以同时获取所有三种语言的颜色和摘要
From vscode 1.20 (Jan 2018) it's possible to create Global snippets : 从vscode 1.20(2018年1月)起 ,可以创建Global片段 :
{
"check": {
"scope": "html,javascript,php",
"prefix": "check",
"body": [
"✅"
]
}
}
To make it work in all languages simply omit the "scope"
要使其适用于所有语言,只需忽略
"scope"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.