Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add Package Control in Sublime Text 3 through the command line

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?

like image 848
Enrique Moreno Tent Avatar asked Oct 22 '13 23:10

Enrique Moreno Tent


People also ask

How do I enable packages in Sublime Text?

Go to SublimeText – Preferences – Package Control (MAC) or Preferences – Package Control (PC) Choose “Install Package” from the list of options.

Where is package control in sublime?

You can find a list of all the packages installed in your Sublime Text editor with Package Control. First open Package Control from Preferences > Package Control as before. Now click on Package Control: List Packages from the list as marked in the screenshot below.

How do I open package control?

Usage. Follow these steps: Press Command-Shift-P (Mac OS X) or Ctrl-Shift-P (Windows) to open the Command Palette. Start typing Package Control until you see the appropriate commands.


1 Answers

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!

like image 75
MattDMo Avatar answered Oct 10 '22 19:10

MattDMo