Centos安装Sublime text 3

Step1:确定你使用得centos是64位的还是32位,从而选择不同的sublime text 3下载
注:(版本选择错误回导致不能正常运行sublime text  3)

查看centos是多少位命令:

# getconf LONG_BIT
Step2:下载sublime软件包,(官网链接:http://www.sublimetext.com/3)
注意一定要选择Ubuntu/tarball包,我的centos是32位所以选择Ubuntu 32 bit 的tarball包;

这里我们将sublime安装到opt目录下,进入opt目录;

# cd /opt


复制链接地址,使用wget命令下载;

# wget https://download.sublimetext.com/sublime_text_3_build_3126_x32.tar.bz2
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      //sublime_text路径地址
Terminal=false
MimeType=text/plain;
Icon=/opt/sublime_text_3/Icon/48x48/sublime-text.png  //sublime图标icon路径地址
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
--------------------- 
作者:月光如注 
来源:CSDN 
原文:https://blog.csdn.net/leesin2011/article/details/71308086 
版权声明:本文为博主原创文章,转载请附上博文链接!

猜你喜欢

转载自blog.csdn.net/f110300641/article/details/84246853