简体   繁体   English

visual studio代码 - html字符串的语法高亮?

[英]visual studio code - syntax highlighting for html strings?

在此输入图像描述

I've been trying to solve this problem for 3 days already but I can't seem to find any extension to have syntax highlighting for strings that used backticks(I don't know what is the general term for this kind of strings). 我已经尝试解决这个问题已经3天了但是我似乎找不到任何扩展来对使用反引号的字符串进行语法高亮(我不知道这种字符串的通用术语是什么)。 But if there are no extensions to enable syntax highlight for this kind of strings, is there any settings for vscode that enables me to syntax higlight? 但是如果没有扩展来为这种字符串启用语法高亮,那么是否有任何vscode设置使我能够使用语法高亮?

To follow-up on Matt Bierner's previous answer. 跟进Matt Bierner之前的回答。

You should use this Visual Studio Code extension: 您应该使用此Visual Studio代码扩展:
angular2-inline angular2内联

This extension replaces the language-vscode-javascript-angular2 extension. 此扩展名替换language-vscode-javascript-angular2扩展名。

here is the extension page with the how to install 这是扩展页面,其中包含如何安装
https://marketplace.visualstudio.com/items?itemName=natewallace.angular2-inline https://marketplace.visualstudio.com/items?itemName=natewallace.angular2-inline

I'm on the VSCode team, and this is not something that we currently support. 我是VSCode团队的成员,这不是我们目前支持的。 Here's the feature request tracking this . 这是跟踪此功能的功能请求

In the meantime, try out the language-vscode-javascript-angular2 extension . 在此期间,请尝试使用language-vscode-javascript-angular2扩展名 It adds syntax highlighting for html elements inside of template strings. 它为模板字符串中的html元素添加了语法高亮。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM