CentOS 6.5 下安装Sublime Text 3而且安装Package Control

首先就是去官网下载安装文件。
注意,要下载Ubuntu/tarball包
或者用wget下载vim

wget https://download.sublimetext.com/sublime_text_3_build_3114_x64.tar.bz2

再解压文件,我把他安装到/opt、目录下sublime-text

tar jxvf sublime_text_3_build_3114_x64.tar.bz2 -C /opt

能够直接命令行运行了app

# cd /opt/sublime_text_3
# ./sublime_text

建立桌面快捷方式ui

# cp /opt/sublime_text_3/sublime_text.desktop /usr/share/applications

更改配置文件url

# vim /usr/share/applications/sublime_text.desktop

个人配置以下.net

[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 3
由于初次启动,可能会要求你输入注册信息,
这里先分享个注册码命令行

—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
93F6323C FD7F7544 3F39C318 D95E6480
FCCC7561 8A4A1741 68FA4223 ADCEDE07
200C25BE DBBC4855 C4CFB774 C5EC138C
0FEC1CEF D9DCECEC D3A5DAD1 01316C36
—— END LICENSE ——

使用Ctrl+`快捷键或者经过View->Show Console菜单打开命令行,粘贴以下代码:code

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两个菜单了ip

相关文章
相关标签/搜索