ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Rainbow​Brackets

by absop ST3

A rainbow brackets plugin for SublimeText4.

Details

Installs

  • Total 32K
  • Win 17K
  • Mac 8K
  • Linux 7K
Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 29 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13
Windows 0 6 7 10 7 4 1 3 9 5 7 6 4 6 7 6 7 9 9 1 5 1 5 11 16 2 6 4 8 7 7 3 4 5 6 9 3 4 4 5 3 8 5 9 4 5
Mac 0 2 3 1 5 1 2 2 2 2 2 2 3 3 3 5 5 5 2 1 2 1 3 5 3 5 0 6 4 1 1 4 0 2 0 4 3 1 2 2 2 1 2 5 4 3
Linux 1 2 4 3 1 2 2 3 1 1 3 5 1 2 5 2 4 5 3 1 0 2 2 3 2 2 3 1 3 5 4 2 7 1 0 2 0 5 1 3 3 1 0 0 6 5

Readme

Source
raw.​githubusercontent.​com

RainbowBrackets

License Downloads

Introduction

RainbowBrackets uses the brackets and colors that you give in the settings file, searches and highlights brackets in file views. Brackets at different levels will be dyed with different colors according to the settings. Colors are gave in a list, and will be used repeatedly.

parentheses, braces, brackets are treated as brackets. brackets are configured in setting file, it means you can use OO as a opening bracket and CC as a close bracket. some characters will cause many match error, can't serve as brackets, such as <>.

Example

{ [ 【 OO OO 《《》OOxCC》 CC CC 】 ] }

Installation

Clone or download this repository to your Packages directory of Sublime Text. Note that the directory name should be the name of this repository.

If you have installed Package Control, press down ctrl+shift+p to get into the command palette, then, input the command pcip (Package Control: Install Package) and Enter to run it. Wait some time… After package infomations have been loaded remotely, input the name of this plugin RainbowBrackets, and press down Enter to install it.

Usage

Settings

Settings template

{
    "debug": false,

    "default_config": {
        "bracket_pairs": {
            "(": ")",
            "[": "]",
            "{": "}"
        },

        "coloring": false,

        "enabled": true,

        "ignored_scopes": [
            "comment",
            "string",
            "constant"
        ],

        "rainbow_colors": [
            "#FF0000", // level0
            "#FF6A00", // level1
            "#FFD800", // level2
            "#00FF00", // level3
            "#0094FF", // level4
            "#0041FF", // level5
            "#7D00E5"  // level6
        ],

        "mismatch_color": "#FF0000"
    },

    "syntax_specific": {
        "Scheme": {
            "extensions": [".scm", ".ss"],

            "ignored_scopes": [
                "comment", "string", "constant", "symbol"
            ]
        },

        "JSON": {
            "bracket_pairs": {
                "{": "}",
                "[": "]"
            },

            "extensions": [
                ".json",
                ".sublime-build",
                ".sublime-color-scheme",
                ".sublime-commands",
                ".sublime-keymap",
                ".sublime-menu",
                ".sublime-settings",
                ".sublime-theme",
            ],

            "ignored_scopes": [
                "comment", "string"
            ]
        }
    }
}
  • ignored_scopes: to ignore brackets in some scopes(such as comment, string).

Commands

  • Preferences: RainbowBrackets Settings
  • RainbowBrackets: toggle debug
  • RainbowBrackets: make rainbow
  • RainbowBrackets: clear rainbow
  • RainbowBrackets: clear color schemes

Key bindings

RainbowBrackets support fast opreating brackets, including select, remove and transform.

Keys Description
ctrl+alt+9 Replace the brackets around the cursors with ()
ctrl+alt+0 Replace the brackets around the cursors with ()
ctrl+alt+[ Replace the brackets around the cursors with []
ctrl+alt+] Replace the brackets around the cursors with []
ctrl+alt+shift+[ Replace the brackets around the cursors with {}
ctrl+alt+shift+] Replace the brackets around the cursors with {}
ctrl+alt+r Remove the brackets around the cursors
ctrl+alt+. Remove the brackets around the cursors and select the text within the brackets
ctrl+alt+, Select the brackets around the cursors and the text within the brackets

Screenshots

  • Material color scheme, JSON file.
  • Material color scheme, Scheme language
  • Material lighter color scheme, Scheme language