Install sublime text 2 package control

Install sublime text 2 package control to easily download and install plugins for the sublime text editor. First open up the console window: view -> show console.

Then past the following command into the console and press enter:

import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print('Please restart Sublime Text to finish installation')

For Sublime Text 3

import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())

 

 

Restart sublime and show the command pallet with Ctrl+ Shift + P. Type “package contol” and select “install package”. A list of installable packages will show up. Choose your packages for installation.

If you are behind a proxy you should add it to your Sublime settings. Goto Preferences -> Settings User and add the following line (add a ‘,’ to the line above if needed):

"http_proxy": "http://username:password@your.proxy.tld:port"
Share

Leave a Reply

Your email address will not be published. Required fields are marked *