【问题标题】:Atom Editor theme change the color of curly brackets when Cursor is Positioned at either start or end当光标定位在开始或结束时,Atom 编辑器主题改变大括号的颜色
【发布时间】:2018-12-30 19:43:12
【问题描述】:

默认情况下,Atom 编辑器会通过一个很难看到的虚线取消突出显示开始和结束大括号。我希望通过更改此突出显示以将背景颜色设置为开始和结束大括号,从而使突出显示更加明显。我怎样才能做到这一点? (如果相关,我正在处理 .js 文件)

我搜索了谷歌并找到了一些链接,但没有专门解决这个问题。我也搜索了原子编辑器文档,但无济于事。

我找到了可以执行此操作的 styles.less 文件,但不知道如何定位此字符来设置样式。

//Example
// style the background and foreground colors on the atom-text-editor-element itself
//This is a made up name for targeting character:
atom-text-editor-curly-brackets {
   background-color: blue;
}

当我通过用彩色背景突出显示大括号字符将光标放在任一端时,我希望能够快速找到左大括号或右大括号。

【问题讨论】:

    标签: atom-editor


    【解决方案1】:

    你检查过这个讨论吗? https://discuss.atom.io/t/set-colour-of-bracket-and-matched-bracket/39018/2

    选择器是:

    .bracket-matcher .region { // your styles here }

    将其添加到您的用户样式表 (.atom/styles.less)。

    似乎您无法轻松地自行设置括号的样式(将它们设为绿色等),但在它们后面设置彩色背景似乎是可能的 !

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-25
      • 1970-01-01
      • 2016-08-29
      • 2016-05-05
      • 2016-09-18
      相关资源
      最近更新 更多