1.Download
Installtion
use tar 解压 压缩包,这里我将包改了个名字,这样就不用写空格的转义字符了,改成Sublime_2.0.2
然后move 到相应的文件下下,我移动到opt,对于下面第一行代码,然后建立软链接,在usr/bin下面,对于第二条语句,建立软链接相当于在usr/bin下面建立一个快捷方式,指向源文件,而因为bin在配置环境path是可执行的目录,可用名令$PATH 查看。
然后再建立桌面快捷方式,这里对应第三句,也可以用sublime 打开,命令类似,sudo sublime /usr/share/applications/sublime.desktop
johnny@johnny-pc:~$ sudo mv ~/Download/Sublime_2. 0.2 /opt/ johnny@johnny -pc:~$ sudo ln -s /opt/Sublime_2. 0.2 /sublime_text /usr/bin/ sublime johnny@johnny -pc:~$ sudo gedit /usr/share/applications/sublime.desktop
然后将一下内容复制到刚打开的sublime.desktop文件里。
################ [ Desktop Entry ] Version =1.0 Name =Sublime Text 2 # Only KDE 4 seems to use GenericName, so we reuse the KDE strings. # From Ubuntu's language-pack-kde-XX-base packages , version 9.20090413 . GenericName = Text Editor Exec = sublime Terminal = false Icon =/opt/Sublime_2.0.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 ################
# 可以更改默认的编辑器(慎用)
sudo sublime /usr/share/applications/defaults.list
打开这个文件后,将gedit.desktop全部替换成sublime.desktop