首页 > 代码库 > Ubuntu16.04下安装sublime text3

Ubuntu16.04下安装sublime text3

通过ppa安装,打开终端,输入以下命令:

sudo add-apt-repository ppa:webupd8team/sublime-text-3

sudo apt-get update

sudo apt-get install sublime-text-installer

卸载 sublime text 命令:

sudo apt-get remove sublime-text-installer

 

装完了以后可以激活它,在Help里输入license key

—– 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 ——

 

 

安装Packeage Control

输入命令subl打开Sublime Text 3

按快捷键ctrl + `(ESC下面的那个键),在弹出的控制台中输入如下代码按回车:

 

import urllib.request,os,hashlib; h = ‘2915d1851351e5ee549c20394736b442‘ + ‘8bc59f460fa1548d1514676163dafc88‘; pf = ‘Package Control.sublime-package‘; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( ‘http://packagecontrol.io/‘ + pf.replace(‘ ‘, ‘%20‘)).read(); dh = hashlib.sha256(by).hexdigest(); print(‘Error validating download (got %s instead of %s), please try manual install‘ % (dh, h)) if dh != h else open(os.path.join( ipp, pf), ‘wb‘ ).write(by)  

 

重启软件后可以在Preference菜单下找到Package Control命令,单击运行Packeage Control,搜索Install Package并进入该选项,此时即可为Sublime Text 3安装所需插件

 

Ubuntu16.04下安装sublime text3