$ wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
$ sudo apt-add-repository "deb https://download.sublimetext.com/ apt/stable/"
sudo apt install sublime-text
下载地址
下载地址 : http://www.sublimetext.com/ (官网)
注册
点击 help -> enter Licence ,然后输入如下信息:
# Licence
----- BEGIN LICENSE -----
sgbteam
Single User License
EA7E-1153259
8891CBB9 F1513E4F 1A3405C1 A865D53F
115F202E 7B91AB2D 0D2A40ED 352B269B
76E84F0B CD69BFC7 59F2DFEF E267328F
215652A3 E88F9D8F 4C38E3BA 5B2DAAE4
969624E7 DC9CD4D5 717FB40C 1B9738CF
20B3C4F1 E917B5B3 87C38D9C ACCE7DD8
5F7EF854 86B9743C FADC04AA FB0DA5C0
F913BE58 42FEA319 F954EFDD AE881E0B
------ END LICENSE ------
sudo vi /etc/hosts
# add
# sublimetext
127.0.0.1 www.sublimetext.com
127.0.0.1 sublimetext.com
127.0.0.1 sublimehq.com
127.0.0.1 license.sublimehq.com
127.0.0.1 45.55.255.55
127.0.0.1 45.55.41.223
0.0.0.0 license.sublimehq.com
0.0.0.0 45.55.255.55
0.0.0.0 45.55.41.223
安装 package control
-
按 ctrl + ~ 键,调出控制台
-
在控制台里输入:
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({
“http”: “socks5://127.0.0.1:1080”,
“https”: “socks5://127.0.0.1:1080”,
})));open(os.path.join(ipp,pf),‘wb’).write(urllib.request.urlopen(‘http://sublime.wbond.net/’+pf.replace(’ ‘,’%20’)).read())
然后回车.看见在preferences里有package control就说明安装成功了
prevent notification
Go to Preferences -> Settings - User and add
“update_check”: false
to the file. This is made to disable automatic updates, but it also appears to disable the notification, at least for me.
While purchasing a legitimate copy is highly recommended, it is still the user’s choice and not particularly a topic for this question.
install Plugin
Go to Perferences -> Browser Packages
download package into this directory
git clone git://github.com/SublimeCodeIntel/SublimeCodeIntel.git
git clone https://github.com/dzhibas/SublimePrettyJson.git
wget https://bitbucket.org/StephaneBunel/pythonpep8autoformat/get/6576275f081a.zip
shortcuts
# plugin default
ctrl + F3 # select a word
ctrl + alt + j # json format
# mac ctrl + win + j
ctrl + shift + r # python pep8 format