How to install plugins to Sublime Text 2 editor?
Asked Answered
A

8

150

How to install plugins to the Sublime Text editor?

I would like to install Emmet plugin to Sublime Text 2 editor.

Angiosperm answered 27/3, 2013 at 5:59 Comment(0)
C
187

You should have a Data/Packages folder in your Sublime Text 2 install directory. All you need to do is download the plugin and put the plugin folder in the Packages folder.

Or, an easier way would be to install the Package Control Plugin by wbond.

Just go here: https://sublime.wbond.net/installation

and follow the install instructions.

Once you are done you can use the Ctrl + Shift + P shortcut in Sublime, type in install and press enter, then search for emmet.

EDIT: You can now also press Ctrl + Shift + P right away and use the command 'Install Package Control' instead of following the install instructions. (Tested on Build 3126)

Conn answered 27/3, 2013 at 6:3 Comment(1)
Note that - in Sublime 3, at least - you can locate the Packages folder by going to the Preferences menu in Sublime and selecting Browse Packages....Agitator
D
60

Install the Package Control first.

The simplest method of installation is through the Sublime Text console. The console is accessed via the Ctrl+` shortcut or the View > Show Console menu. Once open, paste the appropriate Python code for your version of Sublime Text into the console.

Code 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())

Code for Sublime Text 2

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 the up-to-date installation code, please check Package Control Installation Guide.

Manual

If for some reason the console installation instructions do not work for you (such as having a proxy on your network), perform the following steps to manually install Package Control:

  1. Click the Preferences > Browse Packages… menu
  2. Browse up a folder and then into the Installed Packages/ folder
  3. Download Package Control.sublime-package and copy it into the Installed Packages/ directory
  4. Restart Sublime Text

Usage

Package Control is driven by the Command Pallete. To open the pallete, press Ctrl+Shift+p (Win, Linux) or CMD+Shift+p (OSX). All Package Control commands begin with Package Control:, so start by typing Package.

Deroo answered 1/10, 2013 at 8:59 Comment(3)
May be a solution but is certainly the dumbest thing I've ever heard of. Install an installer in order to install packages.Ca
From packagecontrol.io/installation: WARNING: Please do not redistribute the install code via another website. It will change with every release. Instead, please link to this page.Titanium
@Titanium It's true, however SE has Warning that link-only answers are not allowed, therefore if you think the code is out-dated, edit the question and post the updated code. In my answer there are no any hardcoded versions, so I think it should work.Deroo
P
11

Without Package Manager

I highly recommend using the Package Manager as described in other answers as it's far more convenient for both installing and updating. However, sometimes plugins are not in the directory, so here is the manual approach.

First off, find your Packages directory in your Application Support/Sublime Text 2 directory, for example:

~/Library/Application Support/Sublime Text 2/Packages

Now, take your Plugin folder (which you can download as a zip from GitHub, for example) and simply copy the folder into your Packages directory:

cp ~/Downloads/SomePlugin-master/ 
   ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/SomePlugin`

Restart Sublime Text 2 and boom! you're done.

With Package Manager

Refer to one of the other answers here or go to the Package Manager home page.

Bonus Points

If there's a plugin that isn't in the Package Manager, why not submit it on behalf of the author by following the steps found here.

Predetermine answered 24/10, 2014 at 17:52 Comment(0)
C
11
  1. Install the Package Manager as directed on https://packagecontrol.io/installation

  2. Open the Package Manager using Ctrl+Shift+P

  3. Type Package Control to show related commands (Install Package, Remove Package etc.) with packages

Enjoy it!

enter image description here

Cutlerr answered 12/11, 2015 at 6:33 Comment(0)
S
3

You need to install Package Control first (from the Python console in Sublime. Visit http://wbond.net/sublime_packages/package_control for more info), and then install emmet from their repository.

Septima answered 27/3, 2013 at 6:2 Comment(0)
W
1

According to John Day's answer

You should have a Data/Packages folder in your Sublime Text 2 install directory. All you need to do is download the plugin and put the plugin folder in the Packages folder.

In case if you are searching for Data/Packages folder you can find it here

Windows: %APPDATA%\Sublime Text 2

OS X: ~/Library/Application Support/Sublime Text 2

Linux: ~/.Sublime Text 2

Portable Installation: Sublime Text 2/Data

Wendeline answered 12/6, 2016 at 17:35 Comment(0)
R
1

The instruction has been tested on Mac OSx Catalina.

After installing Sublime Text 3, install Package Control through Tools > Package Control. Use the following instructions to install package or theme:

  1. press CMD + SHIFT + P

  2. choose Package Control: Install Package---or any other options you require. package control

  3. enter the name of required package or theme and press enter.

installing package

Raper answered 12/11, 2019 at 21:17 Comment(0)
L
0

Installation code chunks for vanilla Sublime may change in the future.

This link would be the safest place to install plugin support to Sublime Text 2.

For Sublime Text 3 this link works has the code.

enter image description here

Luht answered 30/1, 2019 at 15:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.