How to remove items from Menus of Existing packages


So I have installed quite a few packages and one of the things that really bothers me is that a lot of them include a the option on the context-menu and some even create a new menu on top. For example, the package Pain-Split creates a completely new item in the top bar as “Window” next to “Help”.

So is there a way to remove them without actually changing the packages themselves? I don’t care much about them since I have memorized the shortcuts and it becomes annoying seeing so many of them. One last thing, if it is possible to change them, is there also a way to have them in the order we want? I mean in the context-menu. Like having open in browser second, and maybe correct spelling third? Thanks

Contextual Menu Modification?
Right click menus are HUGE - any way to get them to normal size? (Ubuntu, hi-res screen)

There is an option in settings to auto-hide the menu.


Thanks for the answer! However, I was mostly talking about the right-click menu. See how many options I have, there is too many for my liking. Maybe there is a way to use the file to remove those items from there? Or should I just try to remove them with stylesheets? Sorry if it’s a newb question, I know that i have gone into most packages and they don’t have an option to remove the right-click menu command.


I’d go for a two-pronged approach:

  1. File a bug with the packages in question to put their context-menu items behind an application group, like my tabs-to-spaces package you see in the example.
  2. Look into removing menu items through the I think that’s the approach that will work in the short term.


Thanks. Do you know if an author is also able to publish their package with a settings checkbox to simply just hide the menu even if it’s on an application group? If not, then I will make it a bug request like you said.

Also, would you mind pointing me on how I would go about tackling the individual packages in Like what sort of functions I should be looking for to make them disappear, maybe? Thanks.


There is an undocumented remove function on the MenuManager class:

Perhaps the same thing can be implemented for the ContextMenuManager class:


Thanks, i took a shot at it but within only knowing very little Coffeescript, didn’t go far lol. I’ll leave it open in case someone can answer.


This code should remove packages’ menu items from the menu bar:

# remove menus from the menu bar
packages = ['atom-alignment', 'atom-beautify']

for pkg in packages
  pkg = atom.packages.getLoadedPackage pkg
  return unless pkg?
  {menus} = pkg
  for menu in menus
    mainMenu = menu[1].menu mainMenu

I’m still looking into removing context menus, but it seems there’s not such a nice API for it :frowning:


Ok, it’s ugly but it works :slight_smile: Removes both the menu-bar menus and the context menus from the packages in the packages array.

# remove menus and context menus for packages
# specified in the packages array
packages = ['atom-alignment', 'atom-beautify']

for pkg in packages
  pkg = atom.packages.getLoadedPackage pkg
  continue unless pkg?
  {menus} = pkg
  for menu in menus
    mainMenu = menu[1].menu mainMenu

    contextMenu = menu[1]['context-menu']
        for selector, items of contextMenu
          for itemSet, i in atom.contextMenu.itemSets
            continue unless itemSet.items is items
            atom.contextMenu.itemSets.splice i, 1


I just made a post about noting the differences between menu and contextmenu: Contextmenu and Atom menu I’m hoping someone can pick the up.


This is what I put on the . I’m I doing something wrong? I am on Windows 7, but I dont’ think that should make a difference.


Ah… I think the return should be a continue. I think I tested with the two first packages to load in my setup, so that’s why it worked for me.


I have some similar quiestion. My right click menu is not where is it supposed to be but is always moved to the right and slightly down. I am using dual monitor and ubuntu 15.04. I installed latest atom. I assume there is problem with dual monitor configuration. Thanks.

P.S.: can’t add screenshot because, every time I want to capture it, right click menu disapers


Thank you for the code! I think I’m going to take a stab at expanding the menu-manager package to include toggling menu item visibility, it might end up being very specific to the version of atom, but it will work in the meantime!


It has been requested before: And I’m open for PR.