Home Download Buy Blog Forum Support

Pimping the menu Tools/Packages/...

Pimping the menu Tools/Packages/...

Postby tgkeul on Sun May 16, 2010 11:24 am

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
Code: Select all
      <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
Code: Select all
<bindings>
   <binding key="ctrl+alt+shift+m" command="quickHG"/>
   <binding key="alt+c" command="mercurialCommit"/>
</bindings>

derived QuickHG.package-menu
Code: Select all
<menu>
  <item caption="Command Map" command="quickHG"/>
  <item caption="Commit" command="mercurialCommit"/>
</menu>
tgkeul
 
Posts: 140
Joined: Tue Dec 02, 2008 9:35 pm

Re: Pimping the menu Tools/Packages/...

Postby willi297 on Wed Jun 16, 2010 2:41 pm

+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:
Code: Select all
<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>
Greg Williams
Atomic Embedded, USA
http://atomicembedded.com
willi297
 
Posts: 121
Joined: Wed Nov 18, 2009 8:29 pm
Location: Grand Rapids, MI, USA


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests