是否缓存了配色方案文件? [英] Is color scheme file cached?

查看:27
本文介绍了是否缓存了配色方案文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 Sublime 3 使用 IDLE 配色方案,但它没有 diff 语法高亮.所以我找到了一个我可以使用它的.我使用 PackageResourceViewer 添加了它.在将附加内容添加到方案后,我注意到 diff 语法有效.但我不喜欢插入是蓝色的,而差异标头是绿色的.

I'm using IDLE color scheme for Sublime 3, but it did not have diff syntax highglight. SO I found one that I could use it. I added it using PackageResourceViewer. After adding additional content into scheme, I noticed diff syntax working. But I did not like that insertion was colored blue and diff header was green.

所以我在 diff headerinsertion 之间交换了颜色.但它没有效果.标题仍然是绿色,插入仍然是蓝色.看起来文件被缓存在某处,因为我什至可以删除 diff 高亮声明,它仍然会显示我的亮点.

So I swapped colors between diff header and insertion. But it had no effect. Header was still green and insertion was still blue. It looks like file is cached somewhere, because I could even delete diff highlight declaration and it would still show me highlights.

我目前的方案(颜色交换)是这样的:

My current scheme (with swapped colors) is this:

   <dict>
        <key>name</key>
        <string>diff.header</string>
        <key>scope</key>
        <string>meta.diff, meta.diff.header</string>
        <key>settings</key>
        <dict>
            <key>foreground</key>
            <string>#3333FF</string>
        </dict>
    </dict>
    <dict>
        <key>name</key>
        <string>diff.deleted</string>
        <key>scope</key>
        <string>markup.deleted</string>
        <key>settings</key>
        <dict>
            <key>foreground</key>
            <string>#DD5555</string>
        </dict>
    </dict>
    <dict>
        <key>name</key>
        <string>diff.inserted</string>
        <key>scope</key>
        <string>markup.inserted</string>
        <key>settings</key>
        <dict>
            <key>foreground</key>
            <string>#009933</string>
        </dict>
    </dict>
    <dict>
        <key>name</key>
        <string>diff.changed</string>
        <key>scope</key>
        <string>markup.changed</string>
        <key>settings</key>
        <dict>
            <key>foreground</key>
            <string>#E6DB74</string>
        </dict>
    </dict>

注意.即使我关闭 sublime,用 PRV 打开,我也可以看到在文件中我的更改仍然存在,但实际语法仍然从初始 copy/paste 开始显示.

Note. Even if I close sublime, open with PRV, I can see that in file my changes persist, but actual syntax is still showed from initial copy/paste.

推荐答案

有些软件包经常决定对配色方案进行调整,从而创建一个新的配色方案,以免与原始配色方案混淆 - 然后他们设置您的激活配色方案到他们调整后的副本.因此,虽然 ST 不缓存配色方案 - 它看起来好像确实如此.

Some packages quite often decide to make tweaks to the color scheme, and thus create a new color scheme so as to not mess with the original - then they set your active color scheme to their tweaked copy. Therefore, although ST doesn't cache the color scheme - it will look as though it does.

要检查,您可以在 ST 控制台中查看 view.settings().get('color_scheme') Enter 的输出(查看菜单 -> 显示控制台) - 大多数情况下,执行此操作的包将其配色方案的副本命名为原始版本,并在末尾附加 (package name).

To check, you can see the output from view.settings().get('color_scheme') Enter in the ST console (View menu -> Show Console) - most often the packages that do this name their copy of the color scheme as the original with (package name) appended to the end.

或检查主用户首选项文件.只需将其重新设置为您的配色方案,该包可能会再次执行相同的操作,但至少这次它应该包含您的更改.

Or check the main User preferences file. Just set it back to your color scheme, and the package will probably do the same thing again but at least it should include your changes this time.

这篇关于是否缓存了配色方案文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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