31

I am trying to make a script for setting up my development environment automatically in a linux machine. One of this steps is to install Sublime Text 3.

Installing sublime is not a problem, but I would enjoy if I could install the package manager as well.

Is there any way to install the package manager from the command line?

1 Answer 1

49

The easiest way is to download https://packagecontrol.io/Package%20Control.sublime-package using wget or curl, and store it in ~/.config/sublime-text-3/Installed Packages. It will then set itself up upon first starting the editor. As a bonus, if you create ~/.config/sublime-text-3/Packages/User/Package Control.sublime-settings and populate it with the packages you want installed, everything should work more-or-less automatically to download and install everything. A restart is generally a good idea, but this is a good way to script the setup of a new development environment. As an example, a minimal ST3 Package Control.sublime-settings file is below, so you can get an idea of how it's set up:

{
    "installed_packages":
    [
        "AutoFileName",
        "BracketHighlighter",
        "ExportHtml",
        "GenerateUUID",
        "HexViewer",
        "Neon Color Scheme",
        "PackageResourceViewer",
        "PlistJsonConverter",
        "Python Flake8 Lint",
        "Python Improved",
        "SideBarEnhancements",
        "SideBarGit",
        "SublimeCodeIntel",
        "SublimeREPL",
        "Tag",
        "Terminal",
        "Theme - Soda"
    ]
}

Good luck!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.