Atom(编辑器):修改现有主题并另存为新主题

use*_*351 6 atom-editor

我不想从头开始创建整个主题。

  1. 我想使用现有主题。
  2. 我想对一些元素进行一些小的样式更改(例如颜色)。
  3. 我不想将更改保存在原始主题中,而是保存在副本中。

例如。

  1. 我已经安装了Bade3记事本主题。
  2. 我喜欢notepad ++的突出显示,但发现灰色字符串太浅。
  3. 根据Atom的 语法突出显示指南,Atom的语法突出显示指南我已经在开发人员模式下运行Atom。
  4. 我打开了包含一些带引号的字符串的文件。
  5. 右键单击一些带引号的字符串,然后选择“ 检查元素”
  6. 在样式标签中,我更改颜色值

    .string.quoted.php {颜色:#8b8b8b; }

  7. 所做的更改将应用​​于实际示例代码,因此我可以调整颜色。

  8. 假设我对#107000满意

现在,我希望保存此更改。

Ric*_*ter 6

您可以通过您的个人样式表实现这一点,而无需创建或编辑主题。

  1. 您的“样式Ctrl- Shift-P和打字Application: Open Your Style Sheet
  2. 将在 Atom 中打开一个类似于以下内容的文件:

    // style the background color of the tree view
    .tree-view {
      // background-color: whitesmoke;
    }
    
    // style the background and foreground colors on the atom-text-editor-element itself
    atom-text-editor {
      // color: white;
      // background-color: hsl(180, 24%, 12%);
    }
    
    // To style other content in the text editor's shadow DOM, use the ::shadow expression
    atom-text-editor::shadow {
      // Add Your Styles Here
    }
    
    Run Code Online (Sandbox Code Playgroud)
  3. atom-text-editor::shadow {(第 13 行)和结束}(第 15行)之间的区域中,添加更改的样式:

    .string.quoted.php { color: #8b8b8b; }
    
    Run Code Online (Sandbox Code Playgroud)
  4. 保存样式表并检查它在编辑器中是否按预期工作,无需重新加载或重新启动编辑器。

注意:如果您Use Shadow DOM在 Atom 设置中取消选中复选框,通过Ctrl-访问,,那么您需要将样式放在atom-text-editor {(第 7 行)和结束}(第 10 行)之间。尝试在启用 Shadow DOM 的情况下使用 Atom,因为禁用它的选项将在未来版本中消失。

这是一个简短的动画,介绍了我为使其在 Atom 1.8 Beta 中工作所采取的步骤:

Atom 编辑器:自定义样式