Sublime Forum

Remove context menu items from the user config?

#1

Howdy all,

I’m a bit of a Right Click freak, and I use it more than keyboard shortcuts, so I have created my Context.sublime-menu file and added all my features I want in there and it’s all fine and dandy.

However, how would I go about removing default options that appear on there WITHOUT editing the Default/Context.sublime-menu file? Let’s say for arguments sake I want to remove the default “Copy”, “Cut” and “Paste” options from the right click menu, can I declare that I don’t want them in my User/Context.sublime-menu file?

I’m aware I can place items in certain sections by re-declaring the “-” captioned values by their id value, but I can’t find how to completely remove options.

Any help appreciated!

Thanks

0 Likes

#2

I would also like to know how to do this - I can edit the Context menu files in packages, but they get overwritten when the package updates. How can I do this in such a way that they do not?

0 Likes

#3

You can overwrite the .sublime-menu entries like this:

In your Sublime Package Folder (on Windows, it’s …<user>\AppData\Roaming\Sublime Text 3\Packages), create a new folder that’s named exactly like the package you want to overwrite. For Sublime Core, this is “Default”. In this folder, create a new .sublime-menu file. Either add only your own stuff, or copy the default content and edit it. Most packages are .sublime-package files, but these are basically just .zip which you can open. The Default Package is on Windows normally in C:\Program Files\Sublime Text 3\Packages

0 Likes

#4

[quote=“Narretz”]You can overwrite the .sublime-menu entries like this:

In your Sublime Package Folder (on Windows, it’s …<user>\AppData\Roaming\Sublime Text 3\Packages), create a new folder that’s named exactly like the package you want to overwrite. For Sublime Core, this is “Default”. In this folder, create a new .sublime-menu file. Either add only your own stuff, or copy the default content and edit it. Most packages are .sublime-package files, but these are basically just .zip which you can open. The Default Package is on Windows normally in C:\Program Files\Sublime Text 3\Packages[/quote]

I’d recommend using sublime.wbond.net/packages/Pack … urceViewer if you are going to work with packaged files. It’ll save you the trouble of navigating to/extracting the files yourself. Note that if a plugin is installed via extracting, it may overwrite it. I don’t know how the package control code handles this scenario.

1 Like