Home Download Buy Blog Forum Support

FindKeyConflicts

FindKeyConflicts

Postby skuroda on Wed Nov 07, 2012 5:15 am

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

https://github.com/skuroda/FindKeyConflicts

--Edit--
Can now be installed with package manager.
Last edited by skuroda on Fri Nov 09, 2012 9:38 pm, edited 1 time in total.
skuroda
 
Posts: 677
Joined: Fri Oct 05, 2012 8:11 am

Re: FindKeyConflicts

Postby bizoo on Wed Nov 07, 2012 3:27 pm

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 :)

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.
bizoo
 
Posts: 879
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: FindKeyConflicts

Postby skuroda on Wed Nov 07, 2012 6:01 pm

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 :( Then I figured someone must have written a minifier to take out comments, and we see the result of that :)

--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!
skuroda
 
Posts: 677
Joined: Fri Oct 05, 2012 8:11 am

Re: FindKeyConflicts

Postby skuroda on Fri Nov 09, 2012 1:36 am

Can now be installed through Package Control.
skuroda
 
Posts: 677
Joined: Fri Oct 05, 2012 8:11 am

Re: FindKeyConflicts

Postby bizoo on Fri Nov 09, 2012 9:02 am

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

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:
Code: Select all
["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 ;)
bizoo
 
Posts: 879
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: FindKeyConflicts

Postby skuroda on Fri Nov 09, 2012 9:03 pm

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.
skuroda
 
Posts: 677
Joined: Fri Oct 05, 2012 8:11 am


Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 9 guests

cron