Reputation: 410
I would like to remove button "Remove folder from Project" sometimes I accidentally click on this button and have to re-create the project. I think Sublime pretty flexible editor that allows to remove or add some features.
Thank you for help.
Upvotes: 1
Views: 519
Reputation: 102902
Yes, this is possible, but it takes a few steps. We'll be creating a file override.
Select Preferences → Browse Packages…
(macOS: :Sublime Text → Preferences → Browse Packages…
) to open your Packages
directory:
~/.config/sublime-text-3/Packages
or ~/.config/sublime-text/Packages
~/Library/Application Support/Sublime Text 3/Packages
or ~/Library/Application Support/Sublime Text/Packages
C:\Users\YourUserName\AppData\Roaming\Sublime Text 3\Packages
or C:\Users\YourUserName\AppData\Roaming\Sublime Text\Packages
InstallationFolder\Sublime Text 3\Data\Packages
InstallationFolder\Sublime Text\Data\Packages
The exact path depends on version and whether or not you upgraded from Sublime Text 3.
In that directory, create a directory called Default
. Make sure it's capitalized.
Back in Sublime, open the Command Palette (Ctrl/⌘ Shift P or Tools → Command Palette
) and type v
, then select View Package File
.
Type in def side mount
(it's a fuzzy search) and select Default/Side Bar Mount Point.sublime-menu
.
Select View → Show Console
to open the Sublime Python console. Type in
view.set_read_only(False)
and hit Enter. Now we can edit and save the file.
On line 3 of the file, add 2 forward slashes (//
) at the very beginning of the line to comment out that line. The file should now look like this:
[
{ "caption": "-", "id": "folder_commands" },
// { "caption": "Remove Folder from Project", "command": "remove_folder", "args": { "dirs": []} }
]
Select File → Save As…
. Navigate to the Packages/Default
directory you made in Step 2, and save the file there. Make sure you don't change its name.
Although the change should go into effect immediately, restart Sublime Text just to make sure. The Remove Folder from Project
option should no longer show up when you right-click on a folder in the Side Bar.
Upvotes: 3