Code Editor Wishlist: Search by Hotkey

You know that ninja developer who whips around their IDE like it’s an extension of their physical being? Like the keyboard is not so much an input device as a musical instrument? And they’re constantly dropping tips about how you can do the same? Yeah, me neither.

After a while on a project, even mortal coders develop hotkey muscle memory. They’re engrained so deeply in our brains that we may not even know we’re using them, let alone what the commands are called. I have learned so much editor-fu from pairing with other devs, but sometimes it goes like this:

Them: <type type> (Code changes in surprising and awesome way)

Me: Whoa. What was that?

Them: I don’t know, but it’s freaking amazing, isn’t it? I think it’s… Ctrl+Alt+Shift+~+F3. Yeah.

Me: And what if I don’t have a double-jointed left hand?

Them: I’m sure you could re-map it to something else.

You can imagine how little luck I have Googling for that hotkey, even with a vague description of its effect in vim/emacs/Visual Studio/Eclipse/etc. I need to update my config, but I have no idea what preference to change! What I really want is to search my editor preferences by hotkey to discover what feature it triggers. Then I can re-map it, or disable it, or just talk about it like a human.

It’s easy, just Alt+Shift+M that variable, then Ctrl+1 its declaration and Enter. Duh!

The Project

Build a plugin/script for your code editor that lets me search for a feature using only its keyboard shortcut. After using your tool, I should have enough information to edit the hotkey mapping or find a similar feature in another editor. (Or on another platform; s/Ctrl/⌘/g doesn’t always work.)

Going the other way (finding the hotkey for a function) is usually pretty easy. Menus have had shortcut annotations for decades, and many code editors are now equipped with a universal search that makes hotkey discovery stupid-simple. And, you know, the hotkey actually works when you type it.

Clearly the mapping data is available, it’s just a matter of harnessing it.

Bonus Points

If you can recognize keystrokes as they’re streaming in and display some sort of subtle notification with they hotkey and the function that got triggered, it would make things like pairing and screencasts really cool. Imagine if the conversation above didn’t even need to happen because I saw the hotkey and its mapping in realtime. How cool would it be to watch @daedtech work his TDD magic and follow along at home, keystroke-for-keystroke? Okay, maybe not “cool,” but I know I’d learn a lot.