Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to install Sublime Text 2 under Ubuntu system

Shulou Source: shulou.com Published: 2022-06-01 16:58:11 10月03日 Update

This article introduces the relevant knowledge of "how to install Sublime Text 2 under the Ubuntu system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. Download Sublime Text 2

Download the version of the corresponding system digits on the official website, extract the source code from the compressed package, and double-click the "sublime_text" in the folder to run it directly.

two。 Establish a shortcut link

Copy the entire folder "Sublime" to the / opt directory, then open the terminal and enter the following command to establish a link for sublime_text:

The code is as follows:

Sudo ln-s / opt/Sublime/sublime_text / usr/bin/sublime

3. Create a desktop shortcut

The next step is to create an application shortcut and enter it in the terminal:

Sudo sublime / usr/share/applications/sublime.desktop

In the pop-up text editing window, enter:

The code is as follows:

[Desktop Entry]

Version=1.0

Name=Sublime Text 2

GenericName=Text Editor

Exec=sublime

Terminal=false

Icon=/opt/Sublime/Icon/48 × 48/sublime_text.png

Type=Application

Categories=TextEditor;IDE;Development

X-Ayatana-Desktop-Shortcuts=NewWindow

[NewWindow Shortcut Group]

Name=New Window

Exec=sublime-n

TargetEnvironment=Unity

4. Create right-click launch

Enter in the terminal:

The code is as follows:

Sudo gedit / .local/share/applications/mimeapps.list

On the last line, add:

The code is as follows:

Text/plain=sublime.desktop

Enter in the terminal:

The code is as follows:

Sudo sublime / usr/share/applications/defaults.list

You can then open the text with the right-click open with sublime text 2.

5. Configure Sublime Text 2: install plug-ins using Package Control

Press Ctrl+ `to call up console, paste the following code to the command line at the bottom, and then enter:

The code is as follows:

Import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path (); os.makedirs (ipp) if not os.path.exists (ipp) else None;open (os.path.join (ipp,pf), 'wb') .write (urllib2.urlopen (' http://sublime.wbond.net/'+pf.replace('','% 20')) .read ()

Restart Sublime Text 2, and if you see package control in Perferences- > package settings, the installation is successful.

6. Install the plug-in using Package Control

Press Ctrl+Shift+P to bring up the command panel, enter install to call up the Install Package option and enter, and then select the plug-in to install in the list.

This is the end of the content of "how to install Sublime Text 2 under Ubuntu system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Code input terminal system commands plug-ins text next content files folders more knowledge links practical successful learned one line search digits Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Huawei MariaDB Shulou Information MySQL