package_control icon indicating copy to clipboard operation
package_control copied to clipboard

Exclude unpacked packages from Package Control menu

Open john-cj opened this issue 6 years ago • 3 comments

Is there a way to exclude packages in Packages directory from being visible in Package Control menu? I'm afraid of accidentally delete them.

john-cj avatar May 28 '19 22:05 john-cj

Which menu are you talking about and which packages do you intend to exclude?

FichteFoll avatar May 29 '19 01:05 FichteFoll

I'm talking about the menu which could be invoked by pressing Ctrl+Shift+P and then selecting Package Control: Remove Package item. This menu is shown on the screenshot below.

I have My Package 1, My Package 2, and other unpacked packages in Sublime Text's Packages folder. These packages weren't installed from GitHub. They are just files on my PC. If I accidentally delete one of them by accidentally pressing "Enter" key in the above-mentioned menu, it will be lost.

st1

st1

john-cj avatar May 29 '19 01:05 john-cj

A possible solution to solve this issue is to add a new setting to the Package Control settings file. Something like this:

{
    // Ignore specific directories in the <Data>/Packages folder.
    // These directories will not be listed under Package Control menu,
    // updated, or overwritten.
    "ignore_specific_directories_in_the_packages_folder": [
        // This list is empty by default. We have added 2 packages manually:
        "My Package 1",
        "My Package 2"
    ]
}

john-cj avatar Jun 03 '19 15:06 john-cj