1、下载
或者直接 #wget http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3059_x32.tar.bz2 (linux 通用版本32位)
2、安装
# tar -jxvf sublime_text_3_build_3059_x32.tar.bz2 -C /opt/ (解压安装包到opt目录)
3、链接sublime的启动文件到/usr/bin,以便可以在终端使用sublime启动:
#ln -s /opt/sublime_text_3/sublime_text /usr/bin/sublime
4、建立桌面快捷方式,使用sublime新建sublime.desktop:
#sublime /usr/share/applications/sublime.desktop
[Desktop Entry]
Version=1.0
Name=Sublime_Text _3
GenericName=Text Editor Exec=sublime
Terminal=false
Icon=/opt/sublime_text_3/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
5、还可以将sublime加入右键打开方式菜单列表:
#vi /usr/local/share/applications/mimeinfo.cache
加入text/plain=sublime.desktop;
6、Sublime Text 3 安装Package Control
使用Ctrl+`快捷键或者通过View->Show Console菜单打开命令行,粘贴如下代码:
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())
此时就可以在Preferences菜单下看到Package Settings和Package Control两个菜单了。