The Marauder's MapThe Marauder's Map is a magical guide that shows where all your favorite keyboard shortcuts are! UsageAdd Pages to your very own Marauder's Map, where you can write down your most cherished Spells and Charms. Afterall, the best Witch or Wizard is an organized one! Give each page a memorable name, and save it to a unique key, so you can open it quickly! Record your favorite Spells on your Pages, and give each spell a unique key to cast them quickly when you need them. But don't worry, should you forget how to perform your favorite wizardings, the Marauder's Map will be there to show you the way ! Installing
Setting up
Using
ImplementationNot much special sauce in this one. This extension reads and writes keybindings to keybindings.json then manages the keybindings with dynamic "when" clauses. The best magic tricks are usually the simplest. Tips!keybindingsWhen setting a keybinding for a Page or Spell, you must type the keycodes out the way they appear in common keycodes
example keybindings:
Alternatively, when prompted, the keybinding input may be left blank, this will add the Spell to the Page, but it will only be useable by navigating to it and pressing Map Delay TimeThe time delay before the map opens is user customizable. Change the "Map Delay Time" in Settings, or add The value is (ms) Set Alternatively you may add a setting any SeparatorsTo keep your map organized, you can add a separator to any page
Separators are great for organization, please note this default keyboard shortcut:
updates:
Coming Soon
TroubleshootingCannot change keybingings in keybinding shortcuts UIBecause this extension basically uses a "wrapper" function to work, you will have a plethora of keybindings in you Cannot use "Esc" once map opensIf you set a command for a page to be something with the escape key, (cmd+escape) or some like variation, it will work as expected, UNTIL the map opens. Once the map is open the escape key gets slaved to closing the quickPicker, and while pressing (cmd+escape) will not close the picker, it also will not run your command. The command can still be run by selecting it manually in the picker and pressing "Enter". I do not know of a fix for this, sorry. Keybinding for Spell not immediately available when opening a Pageyou may notice that some keybindings will not work immediately after opening a page of the map, but then the keybinding will work once the map has been displayed. This is most likely due to a conflicting global keybinding being called before the focus has shifted. for example:
Ifpressing (⌘E) and then immediately pressing (⌘M) before the map is displayed toggles the bookmark instead of maximizing the editor group. thenIt has to do with when clause of the conflicting keybinding, it probably is a global keybinding and does not have a when clause. You can fix this by putting "!MaraudersMapIsOpen" in the when clause of the global "toggle bookmark" command. Doing this should prevent VS Code from selecting the conflicting keybinding once you open a Page, even before the Map is actually displayed. Why This Ext?Honestly, the organization of keybindings in vscode pretty much sucks by default. And no, the anwer is NOT Vim. How many keybindings are hidden behind the (ctrl+k) chord... Nobody knows! And also the fact that VS Code calls them "Chords" when they are "Melodies"... And how many different Fold commands are there?!? Who knows the difference between any of them!?! The Command Palette is pretty dope, but typing out what you want for everything just takes forever. The SolutionThis extension allows you to create "pages/menus/groups" (whatever you want to call them) of keybindings that are related to eachother. When a keybinding group is called, you can then press the keybinding for any of the commands in that group immediately, but if you are struggling to remember the exact command you want, a quickPick Box will pop up to prompt you with the available options for that group. One group can call another group... Which means:
With this extension;
This means your workflow doesn't really change from the default behavior, but with this extension you can now go more levels in than Leo it the final scene of Inception, and you can get a visual reminder to help bring you back out! Maybe you want (ctrl+F) to bring up a menu of ALL the Fold commands, now it can! customize your keybindings however you want. Keybindings are scoped to each group so you can reuse commonly used letters over and over again without conflicts. this means you can always use the letter that the command starts with, or you can always have the menu items assigned to your home row keys, or 1, 2, 3, 4, etc., whatever you want. This extension doesn't pretend to fix everything about keybindings in VS Code, but it tries to provide one new feature. Open to any and all contributions/suggestions. I need all the help I can get! Hope you find using this extension as entertaining as I found creating it. Go make some magic happen.You're a Wizard Harry ... |