Sublime Forum

Build 2115 bug: folding code / prev & next view

#1

The keybindings are duped for the new code folding (previously set to next/prev view). I edited my User key bindings to this, which fixes it:

{ "keys": "super+alt+"], "command": "fold" },
{ "keys": "super+alt+]"], "command": "unfold" },
{ "keys": "super+shift+"], "command": "prev_view" },
{ "keys": "super+shift+]"], "command": "next_view" }
0 Likes

#2

Whew. Yes this freaked me out for a few minutes there.

Clearly the JSON of the key bindings file is being validated when saved. Is there anyway to check to ensure that no two key bindings have a collision? Just a thought.

0 Likes

#3

I’d say it’d be a bit difficult to check for a collision, because the whole process is there on purpose to allow you to override the default ones with your own. That is to say that it’s valid to have two things mapped to one keybinding (and scope/context, etc.) because the latter will override the former. This gives us the ability to override the default bindings with our own in the User directory.

Having said that, it might be possible to validate that a single keybindings file (as it is parsed before going into the master list) doesn’t contain two entries for one keybinding. I guess that’s for Jon to decide.

0 Likes