The console output that you posted above shows the following commands being executed:
-
drag_select
(three times)
mix_format_file
-
drag_select
again
The drag_select
command is used when you interact with the buffer via the mouse, so those are not of any consequence. However, the command mix_format_file
is suspicious.
By default Cmd+E is bound to the command slurp_find_string
and Cmd+G is bound to find_next
.
Since no slurp_find_string
command appears, it’s probably the first of those bindings that’s being hijacked; if it was Cmd+G you would see slurp_find_string
being executed, followed by mix_format_file
.
In this particular case I Googled mix_format_file
and found the Sublime package I linked above, and looking in the default key bindings showed that Cmd+E is bound to the command that you’re seeing here. That doesn’t always work out, but knowing what the command is generally helps you track down what package is causing the problem.
In general you can’t really prevent it except to not try packages, or be aware when they’re adding key bindings.
The rules for key bindings (and many other configurable items) is that all packages can define them and they get combined in a certain order; the Default
package (which ships with Sublime) provides the defaults, then all packages are loaded in lexical order and combine with the defaults, and then your User
package (where your custom configuration is stored) is loaded last (more info on that can be found here).
In general a well behaved package would either:
- Provide no default mappings, but show you what to do to make them yourself
- Provide custom mappings that don’t conflict with anything that has a default
- Only replace a default binding with another one that includes a
context
that makes it take effect only where it’s needed
That said there are no requirements in this regard enforced, although these days packages that get added to Package Control will generally be strongly encouraged to follow these guidelines.