我实际上正在尝试获得我在VS2015的VS代码中使用的一个颜色主题。但是主题是针对崇高的文本/原子。我找不到Visual Studio 2015的颜色主题。
我在这里找到了这个问题 Visual Studio 2015 Sublime主题
是否有任何方法可以安装或导入到Visual Studio 2015?
当前没有办法在两种主题格式之间进行转换。Visual Studio使用此处所示的专有主题样式,而Visual Studio代码使用文本对象主题如下所示
Visual Studio格式:
<Color Name="CSS String Value">
<Background Type="CT_AUTOMATIC" Source="00000000" />
<Foreground Type="CT_RAW" Source="FFD69D85" />
</Color>
<Color Name="HTML Attribute">
<Background Type="CT_AUTOMATIC" Source="00000000" />
<Foreground Type="CT_RAW" Source="FF9CDCFE" />
</Color>
Visual Studio代码
<dict>
<key>name</key>
<string>Tag Inline Source</string>
<key>scope</key>
<string>meta.tag.inline source, text.html.php.source</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string>
</string>
<key>foreground</key>
<string>#9AA83A</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Tag Other</string>
<key>scope</key>
<string>meta.tag.other, entity.name.tag.style, entity.name.tag.script, meta.tag.block.script, source.js.embedded punctuation.definition.tag.html, source.css.embedded punctuation.definition.tag.html</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string>
</string>
<key>foreground</key>
<string>#9872A2</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Tag Attribute</string>
<key>scope</key>
<string>entity.other.attribute-name, meta.tag punctuation.definition.string</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string>
</string>
<key>foreground</key>
<string>#D0B344</string>
</dict>
</dict>
如您所见,它们是非常不同的格式,不幸的是,它们之间没有转换的工具。
如果您有一个文本对 .tmtheme
文件,就像崇高文本中的主题一样,则可以使用文档中所述的 yo code
工具将其转换为vscode主题扩展程序:https:https://vscode-docs.readthedocs.io/en/stable/customization/themes/#adding-a-new-theme
基本上,您需要安装npm
。
将.tmtheme
文件从您的终端访问的某个地方,然后:
npm install -g yo generator-code
yo code
按照提示,指定主题文件的完整文件路径。
使用新主题之前,将所得的扩展文件夹放入%vs_code_dir%/extensions/
,然后重新启动VSCODE。