RainbowBrackets
A rainbow brackets plugin for SublimeText3.
Details
Installs
- Total 13K
- Win 7K
- Mac 3K
- Linux 3K
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 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | Feb 8 | Feb 7 | Feb 6 | Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 16 | 22 | 14 | 14 | 7 | 9 | 14 | 13 | 9 | 12 | 17 | 8 | 2 | 13 | 15 | 16 | 13 | 15 | 15 | 10 | 15 | 7 | 14 | 20 | 14 | 9 | 13 | 14 | 16 | 28 | 19 | 20 | 16 | 11 | 13 | 15 | 14 | 8 | 11 | 11 | 9 | 8 | 12 | 16 | 15 | 12 |
Mac | 10 | 7 | 8 | 10 | 2 | 2 | 5 | 10 | 2 | 6 | 10 | 1 | 4 | 5 | 6 | 6 | 3 | 7 | 0 | 2 | 8 | 3 | 8 | 8 | 7 | 2 | 4 | 7 | 6 | 12 | 7 | 14 | 0 | 2 | 7 | 3 | 4 | 4 | 3 | 3 | 4 | 7 | 6 | 6 | 4 | 5 |
Linux | 5 | 3 | 6 | 7 | 2 | 5 | 9 | 6 | 3 | 4 | 3 | 7 | 7 | 4 | 4 | 6 | 3 | 4 | 2 | 7 | 8 | 6 | 4 | 2 | 6 | 3 | 4 | 8 | 9 | 3 | 9 | 5 | 4 | 5 | 5 | 0 | 3 | 7 | 6 | 7 | 5 | 4 | 3 | 4 | 2 | 16 |
Readme
- Source
- raw.githubusercontent.com
RainbowBrackets
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,
"brackets": {
// opening must in pairs
"pairs": {
"(": ")",
"[": "]",
"{": "}"
},
"filetypes": {
"default": {
"opening": ["(", "[", "{"],
"ignored_scopes": [
"comment", "string"
]
},
"scheme": {
"opening": ["(", "[", "{"],
"ignored_scopes": [
"comment", "string", "constant.character", "symbol"
],
"extensions": [
"scm",
"ss"
]
},
"json": {
"opening": ["[", "{"],
"ignored_scopes": [
"comment", "string"
],
"extensions": [
"json",
"sublime-settings",
"sublime-menu",
"sublime-build",
"sublime-keymap",
"sublime-commands",
"sublime-theme",
"sublime-color-scheme"
]
},
// Add custom file types here.
}
},
"rainbow_colors": {
"matched": [
"#FF0000", /* level1 */
"#FF6A00", /* level2 */
"#FFD800", /* level3 */
"#00FF00", /* level4 */
"#0094FF", /* level5 */
"#0041FF", /* level6 */
"#7D00E5" /* level7 */
],
"mismatched": "#FF0000"
}
}
ignored_scopes
: to ignore brackets in some scopes(such as comment, string).pairs
: global brackets pairs dict, opening brackets(left brackets) as keys and closing brackets(right brackets) as values.opening
: left parts of brackets pairs to be searched.
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