Is there a way to override the default main menu in Atom? I would like to be able to have custom menu options rather than the default “file”, “edit”, etc. The Atom MenuManager class provides a means to add additional menus, but I am looking for a way to replace the current main menu bar with custom menus, rather than just add additional drop-downs.
The menu bar is defined in the Atom source and the way to write a completely custom one would be to edit that and then build it.
It seems a bit farfetched that the “hackable text editor for the 21st century” would draw the line of what can be hacked at the menu bar!
Perhaps you might have some idea as to the best solution in the following scenario?
You would like to configure the editor for two audiences: for novice programmers, you would like to hide all but the most elementary menus (and possibly refactor those to eliminate any menu item that might give pause); but for seasoned programmers (or the novices as they got more experience), it would be nice if they could toggle the full menu options back on.
It seems that having to define the menus at build time would prevent such flexibility.
You don’t have to define the menus at build time. Atom has a Menu API, but it is designed around adding to the menus, not wholesale rewriting them.
It doesn’t draw the line there. The menu items are defined in a CSON file that’s really easy to get to. If they were defined on load time, that would be a performance hit just for the off-chance that somebody wanted to completely rewrite the menu bar without doing a rebuild.
Which items? I’m not convinced that any of the default menu items are “advanced”.