diff --git a/CHANGES.md b/CHANGES.md index f32f163..a7ba89c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,8 @@ # BracketHighlighter -## 2.29.5 +## 2.30.0 +- **NEW**: When defining key bindings `type` is now defaulted to `['__all__']` if not set. - **FIX**: Ensure Jinja2 support for works for the Jinja2 package (support existed for some older package). ## 2.29.4 diff --git a/Example.sublime-keymap b/Example.sublime-keymap index 932eb76..9971627 100755 --- a/Example.sublime-keymap +++ b/Example.sublime-keymap @@ -24,7 +24,6 @@ "lines" : true, "plugin": { - "type": ["__all__"], "command": "bh_modules.bracketselect", "args": {"select": "left"} } @@ -41,7 +40,6 @@ "lines" : true, "plugin": { - "type": ["__all__"], "command": "bh_modules.bracketselect", "args": {"select": "right"} } @@ -58,7 +56,6 @@ "lines" : true, "plugin": { - "type": ["__all__"], "command": "bh_modules.bracketselect", "args": {"select": "left", "extend": true} } @@ -75,7 +72,6 @@ "lines" : true, "plugin": { - "type": ["__all__"], "command": "bh_modules.bracketselect", "args": {"select": "right", "extend": true} } @@ -98,8 +94,7 @@ "args": { "plugin": { "args": {"select": "right", "alternate": true}, - "command": "bh_modules.bracketselect", - "type": ["__all__"] + "command": "bh_modules.bracketselect" }, "lines": true, "no_outside_adj": null @@ -115,7 +110,6 @@ "lines" : true, "plugin": { - "type": ["__all__"], "command": "bh_modules.bracketselect" } } @@ -130,7 +124,6 @@ "lines" : true, "plugin": { - "type": ["__all__"], "command": "bh_modules.bracketselect", "args": {"always_include_brackets": true} } @@ -199,7 +192,6 @@ "args": { "plugin": { - "type": ["__all__"], "command" : "bh_modules.foldbracket" } } diff --git a/bh_core.py b/bh_core.py index 4e93b83..4e56be5 100755 --- a/bh_core.py +++ b/bh_core.py @@ -113,6 +113,8 @@ def setup( if 'type' in plugin: for target in plugin["type"]: self.plugin_targets.add(target) + else: + self.plugin_targets.add('__all__') # Region selection, highlight, management self.regions = bh_regions.BhRegion(alter_select, count_lines) diff --git a/docs/src/markdown/customize.md b/docs/src/markdown/customize.md index 02594ba..814480e 100644 --- a/docs/src/markdown/customize.md +++ b/docs/src/markdown/customize.md @@ -1577,7 +1577,7 @@ circumstance it is run, and with what parameters it is run with. Parameter | Description --------- | ----------- -`type` | An array containing the bracket definition names that the plugin should be run on. Use `__all__` for all bracket definitions. +`type` | An array containing the bracket definition names that the plugin should be run on. If `type` is not set, `['__all__']` will be used signifying all bracket definitions. `command` | The plugin to run. For internal plugins, they are referenced by `bh_modules.`. For custom plugins, you should use the folder path relative to `Packages`. So if I had a plugin called `myplugin.py` in my `User/bh_modules` folder, I would use `User.bh_modules.myplugin`. `args` | A dictionary containing the arguments to feed into the plugin. diff --git a/messages.json b/messages.json index d52c5e0..20cdb9f 100644 --- a/messages.json +++ b/messages.json @@ -1,4 +1,4 @@ { "install": "messages/install.md", - "2.29.0": "messages/recent.md" + "2.30.0": "messages/recent.md" } diff --git a/messages/recent.md b/messages/recent.md index 92adfe4..891670b 100644 --- a/messages/recent.md +++ b/messages/recent.md @@ -1,9 +1,11 @@ -# BracketHighlighter 2.29.0 +# BracketHighlighter 2.30.0 New release! A restart might be required. If you see issues immediately after the update please try restarting. -Please see `Preferences->Package Settings->BracketHighlighter->Changelog` -for more info about the release. +## 2.30.0 + +- **NEW**: When defining key bindings `type` is now defaulted to `['__all__']` if not set. +- **FIX**: Ensure Jinja2 support for works for the Jinja2 package (support existed for some older package). diff --git a/support.py b/support.py index 731b163..afddaed 100644 --- a/support.py +++ b/support.py @@ -5,7 +5,7 @@ import webbrowser import re -__version__ = "2.29.5" +__version__ = "2.30.0" __pc_name__ = 'BracketHighlighter' CSS = '''