安装及配置sublime
纯个人笔记,粗略编写,有时间再修改
参考:https://github.com/boontime/sublime-text3-config
参考:https://fatesinger.com/100237
1、获取sublime源码
参考:http://blog.csdn.net/leesin2011/article/details/71308086
2、解压缩安装
# 解压缩 tar jxvf sublime_text_3... # 复制到你要安装的位置 sudo cp -r sublime_text_3 /opt/ # 尝试运行 /opt/sublime_text_3/sublime_text # 复制默认的快捷设置文件到/usr/share/applications/目录下 cp /opt/sublime_text_3/sublime_text.desktop /usr/share/applications/ # 编辑默认的设置文件 [arthur@arthur ~]$ vim sublime_text.desktop
# 设置subl启动sublime
sudo ln -s /opt/sublime_text_3/sublime_text /usr/bin/subl
Package Control组件在线安装
- 按Ctrl+`调出console
- 粘贴以下代码到命令行并回车:
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())
然后 重启
无法访问http:sublime.wbond.net/解决方法:
先下载Package Control.sublime-package;
链接:https://sublime.wbond.net/Package%20Control.sublime-package
百度云链接:https://pan.baidu.com/s/1m_oLLKp4xJoxp3-ui_NSZA 密码:yo90
再打开Sublime text 3,点击Preferences下的Browse Packages,打开目录,回到上一级目录,打开Installed Packages文件夹,将下载的Package Control.sublime-package文件拷贝进该目录!
重启Sublime text 3!
链接:https://sublime.wbond.net/Package%20Control.sublime-package
百度云链接:https://pan.baidu.com/s/1m_oLLKp4xJoxp3-ui_NSZA 密码:yo90
再打开Sublime text 3,点击Preferences下的Browse Packages,打开目录,回到上一级目录,打开Installed Packages文件夹,将下载的Package Control.sublime-package文件拷贝进该目录!
重启Sublime text 3!
用Package Control安装插件的方法:
- 按下Ctrl+Shift+P调出命令面板
- 输入install 调出 Install Package 选项并回车,然后在列表中选中要安装的插件
- https://packagecontrol.io被墙了,Preferences > Package Settings > Package Control > Settings - User
“channels”:
[
“http://cst.stu.126.net/u/json/cms/channel_v3.json”,
]
1. ChineseLocalizations
一种让sublime汉化的插件
![](https://images2015.cnblogs.com/blog/1002710/201702/1002710-20170206152708041-207845263.png)
更新用户设置自动下载配置好的安装包:
1.进入插件目录
2.删除插件目录的user文件夹
3.更新新的user: git clone https://github.com/boontime/sublime-text3-config User
设置用户快捷键
1、侧边栏
{"keys": ["ctrl+k"], "command": "toggle_side_bar"}
{"keys": ["ctrl+k"], "command": "toggle_side_bar"}
2、设置tab转space
菜单Preferences->Settings-User,打开用户配置文件Settings-User(Settings-User会比Setting-Default优先级高)添加:
"tab_size": 4,
"translate_tabs_to_spaces": true,
保存文件,看到右下角显示 Space:4 就说明修改成功
3、代码框框提示
{"anaconda_linting": false}
"pep8_ignore":["E501"]
最近Sublime Text 3 增加了注册码验证功能,如果你使用共享版本的注册码,可能会提示注册码失效,但是却可以正常激活。
只需要把下面的字段加入到你的hosts文件即可:
127.0.0.1 license.sublimehq.com
127.0.0.1 45.55.255.55
127.0.0.1 45.55.41.223
hosts文件的位置
在window平台下的位置:C:\Windows\System32\drivers\etc
在Mac平台下位置:/Private/etc
----- BEGIN LICENSE ----- Member J2TeaM Single User License EA7E-1011316 D7DA350E 1B8B0760 972F8B60 F3E64036 B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD FA0A2ABE 25F65BD8 D51458E5 3923CE80 87428428 79079A01 AA69F319 A1AF29A4 A684C2DC 0B1583D4 19CBD290 217618CD 5653E0A0 BACE3948 BB2EE45E 422D2C87 DD9AF44B 99C49590 D2DBDEE1 75860FD2 8C8BB2AD B2ECE5A4 EFC08AF2 25A9B864 ------ END LICENSE ------
----- 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 ------