【问题标题】:sublime text / textmate color scheme - change highlight colorsublime text / textmate color scheme - 改变高亮颜色
【发布时间】:2015-10-19 20:25:22
【问题描述】:

我希望 sublime 文本主题的一些突出显示颜色更加强烈。

1) 当我选择一个单词时,sublime text 会在文件中标记该单词的所有实例。它在单词周围用非常浅的正方形标记它。我想知道如何改变颜色,让它更强烈,如果我可以给正方形的内部上色。

2) 当文本符号位于方括号/圆括号的一侧时,它会用非常浅的下划线标记两侧。同样的事情 - 我想知道我是否以及如何控制这个下划线的颜色和强度,以及我是否也可以在下划线上方着色(整个字符背景)。

当我使用“霓虹灯”配色方案时,我添加了 2 张图片,这正是我的意思: https://github.com/MattDMo/Neon-color-scheme

我应该更改哪些字段? 自己搞不清楚。

谢谢。

【问题讨论】:

标签: themes sublimetext textmate color-scheme


【解决方案1】:

我是 Neon 主题的作者 - 感谢您使用它!不幸的是,您展示的两个示例,匹配选择的自动突出显示和括号匹配,似乎不能单独进行主题化。如果您查看Neon.tmTheme 第 20-47 行的来源,您会看到为所有内容设置各种颜色的键除了语法高亮 - 选择颜色和轮廓、插入符号颜色、缩进指南等。我已经收集了几年来查看许多不同的配色方案和大量谷歌搜索的所有这些值,但我还没有找到任何专门针对您所询问内容的设置。相反,它们似乎是用caret 颜色或更可能是foreground 颜色(在霓虹灯中它们都是相同的)。

因此,虽然很遗憾您对第一个问题无能为力,但有一个括号匹配的解决方案 - BracketHighlighter 插件。

Neon 包含用于 BracketHighlighter 的 settings,因此您需要做的就是配置插件本身以使用它们。这是我使用的"bracket_styles"

"bracket_styles": {
    // "default" and "unmatched" styles are special
    // styles. If they are not defined here,
    // they will be generated internally with
    // internal defaults.

    // "default" style defines attributes that
    // will be used for any style that does not
    // explicitly define that attribute.  So if
    // a style does not define a color, it will
    // use the color from the "default" style.
    "default": {
        "icon": "dot",
        // BH1's original default color for reference
        // "color": "entity.name.class",
        "color": "brackethighlighter.default",
        "style": "underline"
    },

    // This particular style is used to highlight
    // unmatched bracekt pairs.  It is a special
    // style.
    "unmatched": {
        "icon": "question",
        "color": "brackethighlighter.unmatched",
        "style": "outline"
    },
    // User defined region styles
    "curly": {
        "icon": "curly_bracket",
        "color": "brackethighlighter.curly",
        "style": "underline"
    },
    "round": {
        "icon": "round_bracket",
        "color": "brackethighlighter.round",
        "style": "underline"
    },
    "square": {
        "icon": "square_bracket",
        "color": "brackethighlighter.square",
        "style": "underline"
    },
    "angle": {
        "icon": "angle_bracket",
        "color": "brackethighlighter.angle",
        "style": "underline"
    },
    "tag": {
        "icon": "tag",
        "color": "brackethighlighter.tag",
        "style": "outline"
    },
    "single_quote": {
        "icon": "single_quote",
        "color": "brackethighlighter.quote",
        "style": "underline"
    },
    "double_quote": {
        "icon": "double_quote",
        "color": "brackethighlighter.quote",
        "style": "underline"
    },
    "regex": {
        "icon": "regex",
        "color": "brackethighlighter.quote",
        "style": "underline"
    }
},

希望这对您有所帮助。如果您对 Neon 有任何其他问题、疑虑或一般反馈,请随时open an issue,我会看看我能做些什么。

【讨论】:

  • 你好。非常感谢你。无法想象我会收到如此完整而详细的答案:)。并感谢您编写主题。
  • @user1952686 没问题,很高兴为您提供帮助。如果这个答案addressed your problem,请考虑accepting it,点击答案左侧的复选标记/勾号,将其变为绿色。这标志着问题的解决令您满意,并向您和回答者奖励reputation
猜你喜欢
  • 2022-10-25
  • 1970-01-01
  • 2018-09-27
  • 1970-01-01
  • 1970-01-01
  • 2014-10-26
  • 1970-01-01
  • 2013-10-06
  • 2013-07-23
相关资源
最近更新 更多