如何更改Sublime Text 3 - Twilight主题中的类方法颜色?

时间:2016-05-31 10:53:58

标签: sublimetext3 color-scheme

我正在使用Sublime Text 3,build 3114.这是今天推出的最新版本。在安装此更新之前,使用预安装的主题Twilight时,我的方法以白色突出显示。

安装此最新更新后,它们采用与对象相同的颜色:$object->myMethod();。基本上,“myMethod”与“$ object”具有相同的颜色,而在此更新之前,该方法与括号“()”具有相同的颜色。我尝试使用Twilight复制以前版本的Sublime Text 3的默认颜色方案,但没有,方法的颜色不会改变。以下是该行的截图:

methods color scheme

我想恢复myMethod的原始颜色,它与括号和分号相同。我已经尝试使用PackageResourceViewer编辑默认颜色方案数周,但我根本没有运气。

我的眼睛对于对象/变量的颜色#7587A6很好,但对于现在具有相同颜色的函数或方法则没有。我想要使​​用颜色#F8F8F8的函数和方法,这是大括号,括号和标点符号“(),[],{},。,; ......使用的颜色<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>author</key> <string>Michael Sheets</string> <key>name</key> <string>Twilight</string> <key>settings</key> <array> <dict> <key>settings</key> <dict> <key>background</key> <string>#141414</string> <key>caret</key> <string>#A7A7A7</string> <key>foreground</key> <string>#F8F8F8</string> <key>invisibles</key> <string>#FFFFFF40</string> <key>lineHighlight</key> <string>#FFFFFF08</string> <key>selection</key> <string>#DDF0FF33</string> </dict> </dict> <dict> <key>name</key> <string>Comment</string> <key>scope</key> <string>comment</string> <key>settings</key> <dict> <key>fontStyle</key> <string>italic</string> <key>foreground</key> <string>#5F5A60</string> </dict> </dict> <dict> <key>name</key> <string>Constant</string> <key>scope</key> <string>constant</string> <key>settings</key> <dict> <key>foreground</key> <string>#CF6A4C</string> </dict> </dict> <dict> <key>name</key> <string>Entity</string> <key>scope</key> <string>entity</string> <key>settings</key> <dict> <key>fontStyle</key> <string></string> <key>foreground</key> <string>#9B703F</string> </dict> </dict> <dict> <key>name</key> <string>Keyword</string> <key>scope</key> <string>keyword</string> <key>settings</key> <dict> <key>fontStyle</key> <string></string> <key>foreground</key> <string>#CDA869</string> </dict> </dict> <dict> <key>name</key> <string>Storage</string> <key>scope</key> <string>storage</string> <key>settings</key> <dict> <key>fontStyle</key> <string></string> <key>foreground</key> <string>#F9EE98</string> </dict> </dict> <dict> <key>name</key> <string>String</string> <key>scope</key> <string>string</string> <key>settings</key> <dict> <key>fontStyle</key> <string></string> <key>foreground</key> <string>#8F9D6A</string> </dict> </dict> <dict> <key>name</key> <string>Support</string> <key>scope</key> <string>support</string> <key>settings</key> <dict> <key>fontStyle</key> <string></string> <key>foreground</key> <string>#9B859D</string> </dict> </dict> <dict> <key>name</key> <string>Variable</string> <key>scope</key> <string>variable</string> <key>settings</key> <dict> <key>foreground</key> <string>#7587A6</string> </dict> </dict> <dict> <key>name</key> <string>Invalid – Deprecated</string> <key>scope</key> <string>invalid.deprecated</string> <key>settings</key> <dict> <key>fontStyle</key> <string>italic underline</string> <key>foreground</key> <string>#D2A8A1</string> </dict> </dict> <dict> <key>name</key> <string>Invalid – Illegal</string> <key>scope</key> <string>invalid.illegal</string> <key>settings</key> <dict> <key>background</key> <string>#562D56BF</string> <key>foreground</key> <string>#F8F8F8</string> </dict> </dict> <dict> <key>name</key> <string>-----------------------------------</string> <key>settings</key> <dict/> </dict> <dict> <key>name</key> <string>♦ Embedded Source</string> <key>scope</key> <string>text source</string> <key>settings</key> <dict> <key>background</key> <string>#B0B3BA14</string> </dict> </dict> <dict> <key>name</key> <string>♦ Embedded Source (Bright)</string> <key>scope</key> <string>text.html.ruby source</string> <key>settings</key> <dict> <key>background</key> <string>#B1B3BA21</string> </dict> </dict> <dict> <key>name</key> <string>♦ Entity inherited-class</string> <key>scope</key> <string>entity.other.inherited-class</string> <key>settings</key> <dict> <key>fontStyle</key> <string>italic</string> <key>foreground</key> <string>#9B5C2E</string> </dict> </dict> <dict> <key>name</key> <string>♦ String embedded-source</string> <key>scope</key> <string>string source</string> <key>settings</key> <dict> <key>fontStyle</key> <string></string> <key>foreground</key> <string>#DAEFA3</string> </dict> </dict> <dict> <key>name</key> <string>♦ String constant</string> <key>scope</key> <string>string constant</string> <key>settings</key> <dict> <key>foreground</key> <string>#DDF2A4</string> </dict> </dict> <dict> <key>name</key> <string>♦ String.regexp</string> <key>scope</key> <string>string.regexp</string> <key>settings</key> <dict> <key>fontStyle</key> <string></string> <key>foreground</key> <string>#E9C062</string> </dict> </dict> <dict> <key>name</key> <string>♦ String.regexp.«special»</string> <key>scope</key> <string>string.regexp constant.character.escape, string.regexp source.ruby.embedded, string.regexp string.regexp.arbitrary-repitition</string> <key>settings</key> <dict> <key>foreground</key> <string>#CF7D34</string> </dict> </dict> <dict> <key>name</key> <string>♦ String variable</string> <key>scope</key> <string>string variable</string> <key>settings</key> <dict> <key>foreground</key> <string>#8A9A95</string> </dict> </dict> <dict> <key>name</key> <string>♦ Support.function</string> <key>scope</key> <string>support.function</string> <key>settings</key> <dict> <key>fontStyle</key> <string></string> <key>foreground</key> <string>#DAD085</string> </dict> </dict> <dict> <key>name</key> <string>♦ Support.constant</string> <key>scope</key> <string>support.constant</string> <key>settings</key> <dict> <key>fontStyle</key> <string></string> <key>foreground</key> <string>#CF6A4C</string> </dict> </dict> <dict> <key>name</key> <string>c C/C++ Preprocessor Line</string> <key>scope</key> <string>meta.preprocessor.c</string> <key>settings</key> <dict> <key>foreground</key> <string>#8996A8</string> </dict> </dict> <dict> <key>name</key> <string>c C/C++ Preprocessor Directive</string> <key>scope</key> <string>meta.preprocessor.c keyword</string> <key>settings</key> <dict> <key>foreground</key> <string>#AFC4DB</string> </dict> </dict> <dict> <key>name</key> <string>✘ Doctype/XML Processing</string> <key>scope</key> <string>meta.tag.sgml.doctype, meta.tag.sgml.doctype entity, meta.tag.sgml.doctype string, meta.tag.preprocessor.xml, meta.tag.preprocessor.xml entity, meta.tag.preprocessor.xml string</string> <key>settings</key> <dict> <key>foreground</key> <string>#494949</string> </dict> </dict> <dict> <key>name</key> <string>✘ Meta.tag.«all»</string> <key>scope</key> <string>declaration.tag, declaration.tag entity, meta.tag, meta.tag entity</string> <key>settings</key> <dict> <key>foreground</key> <string>#AC885B</string> </dict> </dict> <dict> <key>name</key> <string>✘ Meta.tag.inline</string> <key>scope</key> <string>declaration.tag.inline, declaration.tag.inline entity, source entity.name.tag, source entity.other.attribute-name, meta.tag.inline, meta.tag.inline entity</string> <key>settings</key> <dict> <key>foreground</key> <string>#E0C589</string> </dict> </dict> <dict> <key>name</key> <string>§ css tag-name</string> <key>scope</key> <string>meta.selector.css entity.name.tag</string> <key>settings</key> <dict> <key>foreground</key> <string>#CDA869</string> </dict> </dict> <dict> <key>name</key> <string>§ css:pseudo-class</string> <key>scope</key> <string>meta.selector.css entity.other.attribute-name.tag.pseudo-class</string> <key>settings</key> <dict> <key>foreground</key> <string>#8F9D6A</string> </dict> </dict> <dict> <key>name</key> <string>§ css#id</string> <key>scope</key> <string>meta.selector.css entity.other.attribute-name.id</string> <key>settings</key> <dict> <key>foreground</key> <string>#8B98AB</string> </dict> </dict> <dict> <key>name</key> <string>§ css.class</string> <key>scope</key> <string>meta.selector.css entity.other.attribute-name.class</string> <key>settings</key> <dict> <key>foreground</key> <string>#9B703F</string> </dict> </dict> <dict> <key>name</key> <string>§ css property-name:</string> <key>scope</key> <string>support.type.property-name.css</string> <key>settings</key> <dict> <key>foreground</key> <string>#C5AF75</string> </dict> </dict> <dict> <key>name</key> <string>§ css property-value;</string> <key>scope</key> <string>meta.property-group support.constant.property-value.css, meta.property-value support.constant.property-value.css</string> <key>settings</key> <dict> <key>foreground</key> <string>#F9EE98</string> </dict> </dict> <dict> <key>name</key> <string>§ css @at-rule</string> <key>scope</key> <string>meta.preprocessor.at-rule keyword.control.at-rule</string> <key>settings</key> <dict> <key>foreground</key> <string>#8693A5</string> </dict> </dict> <dict> <key>name</key> <string>§ css additional-constants</string> <key>scope</key> <string>meta.property-value support.constant.named-color.css, meta.property-value constant</string> <key>settings</key> <dict> <key>foreground</key> <string>#CA7840</string> </dict> </dict> <dict> <key>name</key> <string>§ css constructor.argument</string> <key>scope</key> <string>meta.constructor.argument.css</string> <key>settings</key> <dict> <key>foreground</key> <string>#8F9D6A</string> </dict> </dict> <dict> <key>name</key> <string>⎇ diff.header</string> <key>scope</key> <string>meta.diff, meta.diff.header, meta.separator</string> <key>settings</key> <dict> <key>background</key> <string>#0E2231</string> <key>fontStyle</key> <string>italic</string> <key>foreground</key> <string>#F8F8F8</string> </dict> </dict> <dict> <key>name</key> <string>⎇ diff.deleted</string> <key>scope</key> <string>markup.deleted</string> <key>settings</key> <dict> <key>background</key> <string>#420E09</string> <key>foreground</key> <string>#F8F8F8</string> </dict> </dict> <dict> <key>name</key> <string>⎇ diff.changed</string> <key>scope</key> <string>markup.changed</string> <key>settings</key> <dict> <key>background</key> <string>#4A410D</string> <key>foreground</key> <string>#F8F8F8</string> </dict> </dict> <dict> <key>name</key> <string>⎇ diff.inserted</string> <key>scope</key> <string>markup.inserted</string> <key>settings</key> <dict> <key>background</key> <string>#253B22</string> <key>foreground</key> <string>#F8F8F8</string> </dict> </dict> <dict> <key>name</key> <string>Markup: List</string> <key>scope</key> <string>markup.list</string> <key>settings</key> <dict> <key>foreground</key> <string>#F9EE98</string> </dict> </dict> <dict> <key>name</key> <string>Markup: Heading</string> <key>scope</key> <string>markup.heading</string> <key>settings</key> <dict> <key>foreground</key> <string>#CF6A4C</string> </dict> </dict> </array> <key>uuid</key> <string>766026CB-703D-4610-B070-8DE07D967C5F</string> </dict> </plist> 。”

准确地说,这是我目前使用的主题的默认配色方案,即Twilight.tmTheme:

foo = name.split('_')[4]

非常感谢你给我任何提示!

1 个答案:

答案 0 :(得分:5)

您需要做的就是在第128行插入以下内容:

        <dict>
            <key>name</key>
            <string>Function call</string>
            <key>scope</key>
            <string>meta.function-call variable.function</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#F8F8F8</string>
            </dict>
        </dict>

假设您正在使用JavaScript,这会将函数调用设置为您想要的颜色:

要编辑文件,请安装PackageResourceViewer并从命令选项板中选择PackageResourceViewer: Open Resource。导航到Color Scheme - Default -> Twilight.tmTheme并按 Enter ,然后按 Esc 关闭菜单。按照指示插入上面的文本,保存文件,你应该全部设置。