The process is the same as it’s always been, but it’s not enough to just rename the zip file. The internal structure of the zip has to match the package; most importantly:
tmartin:dart:~/.config/sublime-text/Installed Packages> unzip -l Origami.sublime-package
Archive: Origami.sublime-package
Length Date Time Name
--------- ---------- ----- ----
3785 02-28-2022 21:34 Default (OSX).sublime-keymap
990 02-28-2022 21:34 Origami.sublime-settings
8524 02-28-2022 21:34 Main.sublime-menu
3741 02-28-2022 21:34 Default (Linux).sublime-keymap
217 02-28-2022 21:34 CONTRIBUTORS.md
3740 02-28-2022 21:34 Default (Windows).sublime-keymap
5591 02-28-2022 21:34 Context.sublime-menu
5195 02-28-2022 21:34 Origami.sublime-commands
85 02-28-2022 21:34 .gitignore
4482 02-28-2022 21:34 README.md
260 02-28-2022 21:34 package-metadata.json
1088 02-28-2022 21:34 LICENSE
73 02-28-2022 21:34 messages.json
30462 02-28-2022 21:34 origami.py
466 02-28-2022 21:34 tox.ini
28 02-28-2022 21:34 mypy.ini
893 02-28-2022 21:34 messages/install.txt
389 02-28-2022 21:34 messages/2.1.0.txt
--------- -------
70009 18 files
tmartin:dart:~/Downloads> unzip -l Origami-2.2.3.zip
Archive: Origami-2.2.3.zip
df670bd840250e3368b1b9bed89591d72a219b39
Length Date Time Name
--------- ---------- ----- ----
0 07-15-2021 13:11 Origami-2.2.3/
85 07-15-2021 13:11 Origami-2.2.3/.gitignore
217 07-15-2021 13:11 Origami-2.2.3/CONTRIBUTORS.md
5591 07-15-2021 13:11 Origami-2.2.3/Context.sublime-menu
3741 07-15-2021 13:11 Origami-2.2.3/Default (Linux).sublime-keymap
3785 07-15-2021 13:11 Origami-2.2.3/Default (OSX).sublime-keymap
3740 07-15-2021 13:11 Origami-2.2.3/Default (Windows).sublime-keymap
1088 07-15-2021 13:11 Origami-2.2.3/LICENSE
8524 07-15-2021 13:11 Origami-2.2.3/Main.sublime-menu
5195 07-15-2021 13:11 Origami-2.2.3/Origami.sublime-commands
990 07-15-2021 13:11 Origami-2.2.3/Origami.sublime-settings
4482 07-15-2021 13:11 Origami-2.2.3/README.md
73 07-15-2021 13:11 Origami-2.2.3/messages.json
0 07-15-2021 13:11 Origami-2.2.3/messages/
389 07-15-2021 13:11 Origami-2.2.3/messages/2.1.0.txt
893 07-15-2021 13:11 Origami-2.2.3/messages/install.txt
28 07-15-2021 13:11 Origami-2.2.3/mypy.ini
30462 07-15-2021 13:11 Origami-2.2.3/origami.py
466 07-15-2021 13:11 Origami-2.2.3/tox.ini
--------- -------
69749 19 files
Note that the zip file as downloaded from Github contains the name of the release; that is not required for the package and is actually quite destructive.
Some package resources, such as key bindings and menu extensions, can appear anywhere within a package. Plugins on the other hand are only treated as plugins if they appear in the top level of the package.
In this case that means that for Origami if you just rename the zip file, the menu entries will show up, but the commands that they reference will not exist (and are thus grayed out) ; Packages/Origami/origami.py
is a plugin file, but Packages/Origami/Origami-2.2.3/origami.py
is not.
Probably worth mentioning that python files in other parts of packages are still allowed, but they’re not plugins. Depending on the packages that you use you may notice that there are many Python files in subfolders; that is perfectly fine and the actual plugin knows how to load and use them.
Many packages are also sensitive to the name that they’re installed as, and this does not always match the name of the repository that the package is stored in. Origami isn’t an example of that kind of package, but see for example Pawn syntax
as a package, which is stored in a repository named pawn-sublime-language
.
The name of the package comes from the name of the sublime-package
file; if it doesn’t match then you’ll see things like the items in the menu for opening up package specific settings and key bindings appear to fail, because they’re trying to open files that don’t exist due to the package name being different.
Lastly, unless you’re the developer of Sublime you should not put anything into the Packages
folder that’s in the install location, generally speaking. That is specifically the purview of packages that ship with Sublime, and you may find that package files placed there mysteriously vanish when Sublime updates itself.