How do I order the Packages Menu alphabetically?


#1

Hi,

I’d like to order the Packages Menu of Atom alphabetically as I think it’ll make it easier for me to find submenus for packages of interest. If there is some confusion as to which menu I am referring to, please refer to this screenshot:

Thanks for your time,
Brenton


#2

There isn’t a method of sorting the menu beyond completely rewriting it through the MenuManager.


#3

How would I do this using my config.cson file? I have tried adding (the example from the doc page you linked):

    menu: [
      {
        'label': 'Packages'
        'submenu': [
          'label': 'Tree View'
          'submenu': [
            { 'label': 'Focus', 'command': 'tree-view:toggle-focus' }
            { 'label': 'Toggle', 'command': 'tree-view:toggle' }
            { 'label': 'Reveal Active File', 'command': 'tree-view:reveal-active-file' }
            { 'label': 'Toggle Tree Side', 'command': 'tree-view:toggle-side' }
          ]
        ]
      }
    ]

under core: in my config.cson but that didn’t work.


#4

Atom doesn’t look for menus in the config.cson. Menus can only be added by packages in this way.


#5

init.coffee is run after all packages are activated, so a re-order script there would work.