ubuntu18.04安装Sublime Text 3

下载Linux安装包

Sublime Text 3
得到:sublime_text_3_build_3211_x64.tar.bz2
解压到/opt目录下:

tar -jxvf sublime_text_3_build_3211_x64.tar.bz2 -C /opt/

得到/opt/sublime_text_3

创建桌面图标

创建软链接:

sudo ln -s /opt/sublime_text_3/sublime_text /usr/bin/sublime_text
sudo cp /opt/sublime_text_3/sublime_text.desktop /usr/share/applications/
sudo gedit /usr/share/applications/sublime_text.desktop

修改为:

[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_3/sublime_text 
Terminal=false
MimeType=text/plain;
Icon=/opt/sublime_text_3/Icon/256x256/sublime-text.png
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;

[Desktop Action Window]
Name=New Window
Exec=/opt/sublime_text_3/sublime_text -n
OnlyShowIn=Unity;

[Desktop Action Document]
Name=New File
Exec=/opt/sublime_text_3/sublime_text --command new_file
OnlyShowIn=Unity;

完毕。

你可能感兴趣的:(ubuntu,SublimeText3)