ctrl+shift+p filters: :st2 :st3 :win :osx :linux
浏览

彩虹缩进

作者: jfcherng ST4

让缩进更易于阅读。

标签 indent

详细信息

  • 0.1.6
  • github.​com
  • github.​com
  • 3周前
  • 13分钟前
  • 3个月前

安装次数

  • 288
  • Win 141
  • Mac 84
  • Linux 63
8月6日 8月5日 8月4日 8月3日 8月2日 8月1日 7月31日 7月30日 7月29日 7月28日 7月27日 7月26日 7月25日 7月24日 7月23日 7月22日 7月21日 7月20日 7月19日 7月18日 7月17日 7月16日 7月15日 7月14日 7月13日 7月12日 7月11日 7月10日 7月9日 7月8日 7月7日 7月6日 7月5日 7月4日 7月3日 7月2日 7月1日 6月30日 6月29日 6月28日 6月27日 6月26日 6月25日 6月24日 6月23日 6月22日
Windows 1 1 1 1 1 0 2 1 2 0 1 1 0 2 2 1 1 1 1 3 3 1 1 1 0 1 2 2 0 2 1 3 1 2 4 0 1 1 0 1 1 0 1 1 1 2
Mac 1 1 0 1 2 1 0 0 4 0 0 0 1 1 0 0 2 0 2 1 2 1 2 1 2 1 0 1 1 0 1 0 0 0 2 2 1 0 0 0 0 0 0 0 0 0
Linux 0 0 0 1 0 0 2 1 2 0 0 1 0 2 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 5 1 0 1 0 0 0 2 1 0 1 0 0 0
024688月6日8月3日7月31日7月28日7月25日7月22日7月19日7月16日7月13日7月10日7月7日7月4日7月1日6月28日6月25日6月22日8月6日 Linux: 0 Mac: 1 Windows: 18月5日 Linux: 0 Mac: 1 Windows: 18月4日 Linux: 0 Mac: 0 Windows: 18月3日 Linux: 1 Mac: 1 Windows: 18月2日 Linux: 0 Mac: 2 Windows: 18月1日 Linux: 0 Mac: 1 Windows: 07月31日 Linux: 2 Mac: 0 Windows: 27月30日 Linux: 1 Mac: 0 Windows: 17月29日 Linux: 2 Mac: 4 Windows: 27月28日 Linux: 0 Mac: 0 Windows: 07月27日 Linux: 0 Mac: 0 Windows: 17月26日 Linux: 1 Mac: 0 Windows: 17月25日 Linux: 0 Mac: 1 Windows: 07月24日 Linux: 2 Mac: 1 Windows: 27月23日 Linux: 1 Mac: 0 Windows: 27月22日 Linux: 1 Mac: 0 Windows: 17月21日 Linux: 1 Mac: 2 Windows: 17月20日 Linux: 0 Mac: 0 Windows: 17月19日 Linux: 0 Mac: 2 Windows: 17月18日 Linux: 0 Mac: 1 Windows: 37月17日 Linux: 0 Mac: 2 Windows: 37月16日 Linux: 0 Mac: 1 Windows: 17月15日 Linux: 0 Mac: 2 Windows: 17月14日 Linux: 1 Mac: 1 Windows: 17月13日 Linux: 0 Mac: 2 Windows: 07月12日 Linux: 0 Mac: 1 Windows: 17月11日 Linux: 0 Mac: 0 Windows: 27月10日 Linux: 0 Mac: 1 Windows: 27月9日 Linux: 0 Mac: 1 Windows: 07月8日 Linux: 0 Mac: 0 Windows: 27月7日 Linux: 0 Mac: 1 Windows: 17月6日 Linux: 0 Mac: 0 Windows: 37月5日 Linux: 5 Mac: 0 Windows: 17月4日 Linux: 1 Mac: 0 Windows: 27月3日 Linux: 0 Mac: 2 Windows: 47月2日 Linux: 1 Mac: 2 Windows: 07月1日 Linux: 0 Mac: 1 Windows: 16月30日 Linux: 0 Mac: 0 Windows: 16月29日 Linux: 0 Mac: 0 Windows: 06月28日 Linux: 2 Mac: 0 Windows: 16月27日 Linux: 1 Mac: 0 Windows: 16月26日 Linux: 0 Mac: 0 Windows: 06月25日 Linux: 1 Mac: 0 Windows: 16月24日 Linux: 0 Mac: 0 Windows: 16月23日 Linux: 0 Mac: 0 Windows: 16月22日 Linux: 0 Mac: 0 Windows: 28月6日 Linux: 0 Mac: 1 Windows: 18月5日 Linux: 0 Mac: 1 Windows: 18月4日 Linux: 0 Mac: 0 Windows: 18月3日 Linux: 1 Mac: 1 Windows: 18月2日 Linux: 0 Mac: 2 Windows: 18月1日 Linux: 0 Mac: 1 Windows: 07月31日 Linux: 2 Mac: 0 Windows: 27月30日 Linux: 1 Mac: 0 Windows: 17月29日 Linux: 2 Mac: 4 Windows: 27月28日 Linux: 0 Mac: 0 Windows: 07月27日 Linux: 0 Mac: 0 Windows: 17月26日 Linux: 1 Mac: 0 Windows: 17月25日 Linux: 0 Mac: 1 Windows: 07月24日 Linux: 2 Mac: 1 Windows: 27月23日 Linux: 1 Mac: 0 Windows: 27月22日 Linux: 1 Mac: 0 Windows: 17月21日 Linux: 1 Mac: 2 Windows: 17月20日 Linux: 0 Mac: 0 Windows: 17月19日 Linux: 0 Mac: 2 Windows: 17月18日 Linux: 0 Mac: 1 Windows: 37月17日 Linux: 0 Mac: 2 Windows: 37月16日 Linux: 0 Mac: 1 Windows: 17月15日 Linux: 0 Mac: 2 Windows: 17月14日 Linux: 1 Mac: 1 Windows: 17月13日 Linux: 0 Mac: 2 Windows: 07月12日 Linux: 0 Mac: 1 Windows: 17月11日 Linux: 0 Mac: 0 Windows: 27月10日 Linux: 0 Mac: 1 Windows: 27月9日 Linux: 0 Mac: 1 Windows: 07月8日 Linux: 0 Mac: 0 Windows: 27月7日 Linux: 0 Mac: 1 Windows: 17月6日 Linux: 0 Mac: 0 Windows: 37月5日 Linux: 5 Mac: 0 Windows: 17月4日 Linux: 1 Mac: 0 Windows: 27月3日 Linux: 0 Mac: 2 Windows: 47月2日 Linux: 1 Mac: 2 Windows: 07月1日 Linux: 0 Mac: 1 Windows: 16月30日 Linux: 0 Mac: 0 Windows: 16月29日 Linux: 0 Mac: 0 Windows: 06月28日 Linux: 2 Mac: 0 Windows: 16月27日 Linux: 1 Mac: 0 Windows: 16月26日 Linux: 0 Mac: 0 Windows: 06月25日 Linux: 1 Mac: 0 Windows: 16月24日 Linux: 0 Mac: 0 Windows: 16月23日 Linux: 0 Mac: 0 Windows: 16月22日 Linux: 0 Mac: 0 Windows: 28月6日 Linux: 0 Mac: 1 Windows: 18月5日 Linux: 0 Mac: 1 Windows: 18月4日 Linux: 0 Mac: 0 Windows: 18月3日 Linux: 1 Mac: 1 Windows: 18月2日 Linux: 0 Mac: 2 Windows: 18月1日 Linux: 0 Mac: 1 Windows: 07月31日 Linux: 2 Mac: 0 Windows: 27月30日 Linux: 1 Mac: 0 Windows: 17月29日 Linux: 2 Mac: 4 Windows: 27月28日 Linux: 0 Mac: 0 Windows: 07月27日 Linux: 0 Mac: 0 Windows: 17月26日 Linux: 1 Mac: 0 Windows: 17月25日 Linux: 0 Mac: 1 Windows: 07月24日 Linux: 2 Mac: 1 Windows: 27月23日 Linux: 1 Mac: 0 Windows: 27月22日 Linux: 1 Mac: 0 Windows: 17月21日 Linux: 1 Mac: 2 Windows: 17月20日 Linux: 0 Mac: 0 Windows: 17月19日 Linux: 0 Mac: 2 Windows: 17月18日 Linux: 0 Mac: 1 Windows: 37月17日 Linux: 0 Mac: 2 Windows: 37月16日 Linux: 0 Mac: 1 Windows: 17月15日 Linux: 0 Mac: 2 Windows: 17月14日 Linux: 1 Mac: 1 Windows: 17月13日 Linux: 0 Mac: 2 Windows: 07月12日 Linux: 0 Mac: 1 Windows: 17月11日 Linux: 0 Mac: 0 Windows: 27月10日 Linux: 0 Mac: 1 Windows: 27月9日 Linux: 0 Mac: 1 Windows: 07月8日 Linux: 0 Mac: 0 Windows: 27月7日 Linux: 0 Mac: 1 Windows: 17月6日 Linux: 0 Mac: 0 Windows: 37月5日 Linux: 5 Mac: 0 Windows: 17月4日 Linux: 1 Mac: 0 Windows: 27月3日 Linux: 0 Mac: 2 Windows: 47月2日 Linux: 1 Mac: 2 Windows: 07月1日 Linux: 0 Mac: 1 Windows: 16月30日 Linux: 0 Mac: 0 Windows: 16月29日 Linux: 0 Mac: 0 Windows: 06月28日 Linux: 2 Mac: 0 Windows: 16月27日 Linux: 1 Mac: 0 Windows: 16月26日 Linux: 0 Mac: 0 Windows: 06月25日 Linux: 1 Mac: 0 Windows: 16月24日 Linux: 0 Mac: 0 Windows: 16月23日 Linux: 0 Mac: 0 Windows: 16月22日 Linux: 0 Mac: 0 Windows: 2

说明

源代码
raw.​githubusercontent.​com

ST-RainbowIndent

Required ST Build GitHub Actions Package Control GitHub tag (latest by date) Project license GitHub stars Donate to this project using Paypal

screenshot

让缩进更易于阅读。

这是对Indent Rainbow VSCode 扩展的一个简单概念克隆。

安装

此软件包可在 Package Control 上找到,名称为 RainbowIndent

常见问题解答

如何自定义缩进颜色?

首先,您必须决定您想用于缩进的色彩数量。

例如,如果您想使用 6 种颜色,请将以下内容添加到插件中的 level_colors 设置。

"level_colors": [
    "region.indent.0",
    "region.indent.1",
    "region.indent.2",
    "region.indent.3",
    "region.indent.4",
    "region.indent.5",
],

region.indent.0region.indent.5 在 Sublime Text 中被称为 scope。名称对 scope 并不重要,但我只是感觉这些名称是自我解释的。

接下来,您必须为这些 scope 添加您的颜色方案的着色规则。例如,将以下规则添加到您的颜色方案中。

  • foreground 是当 level_style 设置为 line 时缩进行的颜色。
  • background 是当 level_style 设置为 block 时的缩进背景颜色。

有效颜色格式列在 Sublime Text 官方文档中

///////////////////
// RainbowIndent //
///////////////////
{
    // red
    "foreground": "rgba(229, 57, 53, 0.35)",
    "background": "rgba(229, 57, 53, 0.2)",
    "scope": "region.indent.0",
},
{
    // green
    "foreground": "rgba(67, 160, 71, 0.35)",
    "background": "rgba(67, 160, 71, 0.2)",
    "scope": "region.indent.1",
},
{
    // blue
    "foreground": "rgba(30, 136, 229, 0.35)",
    "background": "rgba(30, 136, 229, 0.2)",
    "scope": "region.indent.2",
},
{
    // orange
    "foreground": "rgba(251, 140, 0, 0.35)",
    "background": "rgba(251, 140, 0, 0.2)",
    "scope": "region.indent.3",
},
{
    // purple
    "foreground": "rgba(142, 36, 170, 0.35)",
    "background": "rgba(142, 36, 170, 0.2)",
    "scope": "region.indent.4",
},
{
    // cyan
    "foreground": "rgba(0, 172, 193, 0.35)",
    "background": "rgba(0, 172, 193, 0.2)",
    "scope": "region.indent.5",
},

如何禁用默认渲染并启用手动渲染?

您可以设置插件的 enabled_selector 设置为 "nothing"。因为没有命名 nothing 的范围,所以此插件不会渲染缩进。

然后,您可以通过以下任一方式手动启用渲染。

  • 从命令板:RainbowIndent: Disable for This View (Forced)
  • 从上下文菜单:RainbowIndent » Disable for This View (Forced)
  • rainbow_indent_view_toggle 命令创建和触发快捷键以方便使用。

已知问题

  • 通过 ST 的插件 API,无法绘制中没有内容的部分。
  • 有时,ST 好像错误地绘制区域。不确定如何稳定地重现此问题。