http://blog.csdn.net/leesin2011/article/details/71308086
Step1:确定你使用得centos是64位的还是32位,从而选择不同的sublime text 3下载
注:(版本选择错误回导致不能正常运行sublime text 3)
查看centos是多少位命令:
注意一定要选择Ubuntu/tarball包,我的centos是32位所以选择Ubuntu 32 bit 的tarball包;
这里我们将sublime安装到opt目录下,进入opt目录;
复制链接地址,使用wget命令下载;
Step3:解压软件包
- # tar jxvf sublime_text_3_build_3126_x32.tar.bz2
Step4:命令行下直接运行sublime 3
- # cd /opt/sublime_text_3
- # ./sublime_text
Step5:创建桌面快捷方式
- # cp /opt/sublime_text_3/sublime_text.desktop /usr/share/applications
修改配置文件
- # vim /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 %F
- Terminal=false
- MimeType=text/plain;
- Icon=/opt/sublime_text_3/Icon/48x48/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/sublime_text_3 --command new_file
- OnlyShowIn=Unity;
(注:加备注的为要修改的地方)
此时就可以在应用程序 >编程 > Sublime Text”右键”将此启动器添加到桌面”来启动sublime text 3