Centos安装Sublime text 3

来源:互联网 发布:库存查询软件 编辑:程序博客网 时间:2024/05/16 16:16

http://blog.csdn.net/leesin2011/article/details/71308086


Step1:确定你使用得centos是64位的还是32位,从而选择不同的sublime text 3下载

注:(版本选择错误回导致不能正常运行sublime text  3)

查看centos是多少位命令:

[php] view plain copy
  1. # getconf LONG_BIT  

Step2:下载sublime软件包,(官网链接:http://www.sublimetext.com/3)

注意一定要选择Ubuntu/tarball包,我的centos是32位所以选择Ubuntu 32 bit 的tarball包;

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

[php] view plain copy
  1. # cd /opt  




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

[php] view plain copy
  1. # wget https://download.sublimetext.com/sublime_text_3_build_3126_x32.tar.bz2  

Step3:解压软件包

[php] view plain copy
  1. # tar jxvf sublime_text_3_build_3126_x32.tar.bz2  

Step4:命令行下直接运行sublime 3

[php] view plain copy
  1. # cd /opt/sublime_text_3  
  2. # ./sublime_text  

Step5:创建桌面快捷方式

[php] view plain copy
  1. # cp /opt/sublime_text_3/sublime_text.desktop /usr/share/applications  

修改配置文件

[php] view plain copy
  1. # vim /usr/share/applications/sublime_text.desktop  

我的配置如下

[php] view plain copy
  1. [Desktop Entry]  
  2. Version=1.0  
  3. Type=Application  
  4. Name=Sublime Text  
  5. GenericName=Text Editor  
  6. Comment=Sophisticated text editor for code, markup and prose  
  7. Exec=/opt/sublime_text_3/sublime_text %F      //sublime_text路径地址  
  8. Terminal=false  
  9. MimeType=text/plain;  
  10. Icon=/opt/sublime_text_3/Icon/48x48/sublime-text.png  //sublime图标icon路径地址  
  11. Categories=TextEditor;Development;  
  12. StartupNotify=true  
  13. Actions=Window;Document;  
  14.   
  15. [Desktop Action Window]  
  16. Name=New Window  
  17. Exec=/opt/sublime_text_3/sublime_text -n  //打开新窗口路径  
  18. OnlyShowIn=Unity;  
  19.   
  20. [Desktop Action Document]  
  21. Name=New File  
  22. Exec=/opt/sublime_text/sublime_text_3 --command new_file   //创建新文件的命令路劲  
  23. OnlyShowIn=Unity;  

(注:加备注的为要修改的地方)

此时就可以在应用程序 >编程 > Sublime Text”右键”将此启动器添加到桌面”来启动sublime text 3


原创粉丝点击