Sublime Forum

FindKeyConflicts

#1

Anyways, this simple plugin displays key bindings, via the quick panel, that have mapping in multiple packages. There are some additional settings to help manage what to ignore. Currently, the quick panel is only used to display packages with conflicting bindings. There is no additional action taken (yet).

I was surprised there wasn’t a plugin to do this (or at least I couldn’t find it, which is highly probably). So if there is one, can someone direct me to it?

Anyways, questions, comments, concerns, and general feedback are welcome!

Example output

github.com/skuroda/FindKeyConflicts

–Edit–
Can now be installed with package manager.

0 Likes

Plugin proposal/idea: "Find clashing keymaps"
#2

I’ve done something similar long times ago but didn’t found the times to clean the code enough to publish it.
I push my code to github, maybe there’s something useful for you: https://github.com/bizoo/KeymapTools
I see we have used same json parser :smile:

I didn’t test your plugin yet, but I will. Anything that could help managing keybindings is a must have in ST2.

Thanks for sharing your works.

0 Likes

#3

Well to be fair I wouldn’t call my implementation “clean.” More of a, it seems to have the basic functionality I wanted, and I didn’t see anything like it on from my searches, so thought I would post it. Thanks for putting your stuff up! Yup that JSON minifier is nice. Tried with just the JSON parse only to see it break :frowning: Then I figured someone must have written a minifier to take out comments, and we see the result of that :smile:

–Edit–
So I had more extra time today than I thought I would (and I wanted to do this), but I think I’ve implemented all of the things you were aiming for. I have to say, I hadn’t thought of multi part key maps conflicting (shows that I don’t use those plugins yet haha), so I’m glad it was in yours. Also, the buffer output stuff you had was very useful, so thank you. I’m sure you’ll notice mine looks very similar (okay its the same) as yours.

So thanks again. Let me know what you think!

0 Likes

#4

Can now be installed through Package Control.

0 Likes

#5

Hey, great job !!!
I like it a lot :smiley:

I’ve only found an issue so far by comparing with the results of my own code:
This entry is returned by my code but not by your plugins:

"ctrl+shift+backspace"] left_delete Default run_macro_file Default
Didn’t look at your code but I suppose that the problem is when the same keybinding is defined more than once in the same file (this example is from Default\Default (Windows).sublime-keymap).

Thanks again for your works, and it’s nice to mention my name in the readme :wink:

0 Likes

#6

Yea, I noticed that too. I’ve been trying to figure out how to deal with that scenario. That is, one would assume if the key mappings are from the same package, even if they have the same key mappings, they should have different context, or something like that to keep them from conflicting with each other. Think I will make it an option to display those also, and let the end user decide if they want those to show up.

0 Likes