Sublime Forum

Pimping the menu Tools/Packages/

#1

Since I use ST I think the packages menu is somewhat hidden and therfore can’t tap its full potential.
Some of the packages I use rarely. Between the usages I may forget key bindings and some of the commands provided. I searched for a solution to assist my memory. I know of ChooseAnyCommand, but it doesn’t show key bindings.

My simple solution is

  • to raise the packages menu into the menubar and

  • provide every package having a default.sublime-keymap with a package-menu

Extract of my Main.sublime-menu

		<item caption="Playback &amp;Macro" command="runMacro"/>
		<item caption="Sa&amp;ve Macro..." command="saveMacro"/>
		<dynamicmenu caption="Mac&amp;ros" key="runMacro"/>
	</menu>

	<dynamicmenu caption="Packages" key="packages"/>

	<menu caption="&amp;Project">
		<item caption="New Project..." command="newProject"/>
		<item caption="Open Project..." command="openProject"/>

The package-menu is a modified copy of the default.sublime.keymap, for example:

Original QuickHG default.sublime.keymap

<bindings> <binding key="ctrl+alt+shift+m" command="quickHG"/> <binding key="alt+c" command="mercurialCommit"/> </bindings>
derived QuickHG.package-menu

[code]

[/code]
0 Likes

#2

+1 on this feature request! I REALLY would like the Packages to have their own menu for easier access. I also agree with having some method of combining package menus and key bindings, so that the duplication/synchronization can be eliminated.

Personally, I create package bindings file AND a package menu file for each package so that I can have a menu-driven option (for those that don’t like remembering keybindings), but since the menu items show the associated key bindings as well, it serves as a key binding reference as well.

Would be nice if the key bindings and package menus could be combined into a single file, even a new file type even. I would propose a schema somewhat like the following:

<extensions>
    <separator caption="Assorted Magic" /> <!-- applies to menus only, and adds optional captions to the separators for labeling groups of menu items -->
    <extension caption="Add a dash of &amp;magic" binding="ctrl+alt+m" command="addMagic" /> <!-- combines menu item and binding -->
</extensions>
0 Likes