Sublime Text 2 installation under Linux

  
        

Installation Method 1:

To install via apt-get install, you can do the following:

sudo add-apt-repository ppa:webupd8team/sublime-text-2

sudo apt-get update

sudo apt-get install sublime-text-2

Installation Method 2:

1. Download the installation package from the official website

2. Decompression is not difficult, just find a directory to decompress, but considering the need to be able to quickly start under the command line, it is recommended to extract to the /usr/lib/directory, the method I use is first decompressed Move, the command is as follows:

tar -xvf Sublime\\ Text\\ 2.0.1.tar.bz2

mv Sublime\\ Text\\ 2 /usr/lib/

where \\ is the escape character

This is because the $PATH environment variable automatically covers the /usr/lib directory, there is no need to specifically modify the environment variables.

Then type:

ln -s /usr/lib/Sublime\\ Text\\ 2/sublime_text /usr/bin/sublime

3.Sidebar LaunchBar Settings< Br>

Since it is not installed, some basic configuration of the Ubuntu desktop is missing. For example, it cannot be added to the launcher on the desktop side. This is not the same as the program installed through the software installation center. To do this, you need to add a configuration file, placed in the /usr/share/appliations/path, such as adding sublime.desktop, the file content is as follows:

Reference configuration 1:

[Desktop Entry]

Version=2.0.1

Name=Sublime Text 2

GenericName=Text Editor

Exec=sublime

Terminal=false

Icon=/usr/lib/Sublime Text 2/Icon/48x48/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

Reference Configuration 2:

[Desktop Entry]

Version=1.0

Type=Application

Name=Sublime Text

GenericName=Text Editor

Comment=Sophisticated text editor for code, markup and prose

Exec=/opt/sublime_text/sublime_text %F

Icon=sublime-text

Terminal=false

MimeType=text/plain;

Categories=TextEditor;Development;

StartupNotify=true< Br>

Actions=Window;Document;

[Desktop Action Window]

Name=New Window

Exec=/opt/sublime_text/sublime_text -n

OnlyShowIn=Unity;

[Desktop Action Document]

Name=New File

Exec=/opt/sublime_text/sublime_text --command new_file

OnlyShowIn=Unity;

FAQ:

In terms of Chinese characters, the previous ST support is not very good. Now I can verify it and display it. The input is still a bit problematic. (Cannot input Chinese characters, but can display Chinese fonts)

The plug-in installation has package control, graphical interface, very convenient operation, zencoding and other famous things must be installed.

Cracking is not necessary, because pop-ups are not too much trouble and the frequency is very low.

Copyright © Windows knowledge All Rights Reserved