Ubantu 16.04安装Sublime Text 3 过程
1.下载sublime text 3
点击进入网页https://www.sublimetext.com/
2.安装 sublime text 3
添加sublime text 3的仓库:
sudo add-apt-repository ppa:webupd8team/sublime-text-3
更新软件库:
sudo apt-get update
安装 sublime text 3:
sudo apt-get install sublime-text-installer
3.卸载:
sudo apt-get remove sublime-text-installer
4.安装扩展包:
安装插件管理器Package Control。打开sublime text 3,【view】->【Show Console】调出输入框,然后粘贴下面代码到输入框完成插件管理器Package Control的安装:
import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; 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)
官方说明网站:https://packagecontrol.io/installation#st3
5.解决不能输入中文问题
在终端输入命令,下载需要的文件:
git clone https://github.com/lyfeyaj/sublime-text-imfix.git
将 subl 移动到 /usr/bin/,将sublime-imfix.so移动到/opt/sublime_text/
cd ~/sublime-text-imfix
sudo cp ./lib/libsublime-imfix.so /opt/sublime_text/
sudo cp ./src/subl /usr/bin/