Sublime Forum

Annoying duplicate menu

#1

This is annoying. I’ve had this for more than three years, and searched many time, still no idea what is the cause. I can remove my ~/Library/Application Support/Sublime Text 3 folder, then it will be normal, but I don’t want to reinstall and configer everthing.

I know it’s not duplicate Main.sublime-menu becaue I only found one file use grep -r "Undo Selection" ./* in my subline folder:
./Packages/User/Default/Main.sublime-menu: "caption": "Undo Selection",
What is the possible case of the duplication?

0 Likes

#2

more image:

0 Likes

#3

and one more image:

0 Likes

#4

The default menu comes from Packages/Default/Main.sublime-menu, not Packages/User/Default/Main.sublime-menu, so this is likely the reason for your woes.

If the purpose of this file is to add extra menu items only, you can edit it and remove everything except the ones that you wanted to add. If you meant to override the default menu entirely it should be stored as Packages/Default/Main.sublime-menu (i.e. not in that folder inside of your User package).

When Sublime loads the resources for e.g. the main menu, it collects all of the files named Main.sublime-menu from all packages and combines them together into a single file.

In contrast, since the Default package is shipped as a sublime-package file, creating a folder named Default in the Packages folder and putting Main.sublime-menu inside of it tells Sublime to ignore the version of the file as it exists in the package and use your copy instead.

This page from the Unofficial Documentation covers this in a bit more detail.

1 Like

#5

Thanks a lot! the top duplicated menu is gone after I delete the Main.sublime-menu file from the user folder. And delete Syntax.sublime-menu and Indentation.sublime-menu to clear the duplicate menu on foot bar.

1 Like