更改 sublime text 3 html 标签外壳颜色 [英] Changing sublime text 3 html tag enclosure colors

查看:22
本文介绍了更改 sublime text 3 html 标签外壳颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用这个工具来设置我的 sublime text 3 配色方案,以匹配我在 coda 2 上使用内置编辑器制作的自定义配色方案:

I've been using this tool to set up my sublime text 3 color scheme to match the custom one that I made using the built in editor on coda 2:

http://tmtheme-editor.herokuapp.com/

这个编辑器很棒,但我无法更改 < 的颜色.和 > 围绕 html 标签而不改变其他地方常规文本的颜色.

This editor is great, but I'm having trouble changing the color of the < and > around html tags without changing the color of regular text elsewhere.

我的主题文件中的以下内容更改了 < 中文本的颜色.>.

The following in my theme file changes the color of the text inside the < >.

<dict>
    <key>name</key>
    <string>Tag name</string>
    <key>scope</key>
    <string>entity.name.tag</string>
    <key>settings</key>
    <dict>
        <key>fontStyle</key>
        <string></string>
        <key>foreground</key>
        <string>#24549d</string>
    </dict>
</dict>

以下内容似乎将我文件中的所有常规文本更改为黑色,并更改了 <和 > 围绕 html 标签.

And the following seems to change all of the regular text in my file to black, as well as changing the < and > around html tags.

<dict>
    <key>name</key>
    <string>Normal Variable</string>
    <key>settings</key>
    <dict>
        <key>fontStyle</key>
        <string>bold</string>
        <key>foreground</key>
        <string>#000000</string>
    </dict>
</dict>

因此在我的配色方案文件中使用上述内容会导致我的 html 如下所示:

So using the above in my color scheme file results in my in html like this:

<p>I want this text to be black, and the full tag to be blue</p>

有黑有黑 <和 > 带有蓝色 p 和黑色文本.

To have black a black < and > with blue p's and black text.

将普通变量颜色更改为蓝色可以让完整的 html 标签变为蓝色,但也有将文本更改为蓝色的副作用,而我希望文本保持黑色.

Changing the Normal Variable color to blue allows the full html tag to become blue, but has the side effect of also changing the text to blue, while I'd like the text to stay black.

Normal Variable 似乎也可以控制 sublime text 3 中行号的颜色.

Normal Variable also seems to have control over the color of the line numbers in sublime text 3, too.

有没有人有使用 sublime text 3 配色方案系统的经验,或者知道如何专门针对 <和 > 围绕 html 标签?我似乎通过 google 找到的所有内容都与 sublime text 2 相关,并且具有完全不同的外观系统来设置颜色.一个解释颜色主题文件不同选项的资源链接也很棒,只要它是用于 sublime text 3 而不是 sublime text 2.

Does anyone have experience with the sublime text 3 color scheme system, or know how to specifically target the < and > around html tags? Everything I seem to find through google relates to sublime text 2, and has a completely different looking system for setting the colors. A link to a resource explaining the different options for the color theme files would be great too, as long as it's for sublime text 3, and not sublime text 2.

推荐答案

我是你提到的编辑器的开发者.
编辑器有很多不足之处.我正在开发一个新版本,在空闲时间支持不同语言的预览,但还没有完成.

I'm the developer of the editor you mentioned.
The editor has a lot of shortcomings. I'm working on a new version that supports preview for different languages in my free time, but it's not finished yet.

在此期间,我可以帮助您解决问题.您应该将此规则添加到您的 tmTheme 文件以定位标签标点符号.

In the meantime I can help you solve your problem. You should add this rule to your tmTheme file to target tag punctuations.

    <dict>
        <key>name</key>
        <string>Tag Punctuations</string>
        <key>scope</key>
        <string>punctuation.definition.tag.begin, punctuation.definition.tag.end</string>
        <key>settings</key>
        <dict>
            <key>foreground</key>
            <string>#FF0000</string>
        </dict>
    </dict>

这篇关于更改 sublime text 3 html 标签外壳颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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