Sublime Forum

Sublime 4: Remove "Delete File" and "Delete Folder" from context menu?

#1

Hi there, folks!
I have been working on a plugin the last few days, and I stumbled on a weird issue…
I was able to somewhat hide the stock menu items by declaring a class with the name of the command, and returning False from its is_visible and is_enabled methods, like so:

class NewFolderCommand(WindowCommand):
    def is_visible(self):
        return False

    def is_enabled(self):
        return False

But I can’t get rid of that pesky Delete File / Delete Folder menu item no matter what I do. Does anyone have suggestions?

Thanks! :heart:

0 Likes