Sublime Text Help document And Common problem

Sublime Text3

Question 1:

Package Control
There are no packages available for installation
Please see https://packagecontrol.io/docs/troubleshooting for help

或者

1
2
3
4
5
6
7
8
9
---------------------------
Sublime Text
---------------------------
Package Control

There are no packages available for installation
---------------------------
确定
---------------------------

answer:
一般是channel_v3.json访问过慢或者访问不了
在Package Settings -> Package Control -> Settings - Default 添加

1
2
3
4
5
"channels": [
"channels": [
"https://packagecontrol.io.tiiao.cn/channel_v3.json"
],"
],

PackageControl镜像

只要在插件原地址后面加个 .tiiao.cn 即可

原理:国外虚拟主机CURL获取https://packagecontrol.io/channel_v3.json

插件原地址

1
"channels": [ "https://packagecontrol.io/channel_v3.json" ]

博主提供镜像

1
"channels": [ "https://packagecontrol.io.tiiao.cn/channel_v3.json" ]

PackageControl中文镜像站

1
"channels": [ "http://packagecontrol.cn/channel_v3.json" ]

Sublime Text 中运行PHP

answer:

在菜单里Tool-》Build System-》New Build System
把默认的

1
2
3
{
"shell_cmd": "make"
}

修改为:

1
2
3
4
5
6
{ 
"cmd": ["php", "$file"],
"file_regex": "php$",
"selector": "source.php"

}

然后保存在默认位置,文件名字为”php.sublime-build “.

运行方式 Ctrl+B

Sublime Text 中运行Go

下载GoSublime

如果Package Control搜索不到则到 https://github.com/DisposaBoy/GoSublime/releases 进行下载

安装方法

首选设置 - 浏览插件 -将下载的GoSublime解压到文件夹

新建编译环境,在菜单里Tool-》Build System-》New Build System

1
2
3
4
5
6
{ 
"cmd": ["go", "run", "$file_name"],
"file_regex": "^[ ]*File \"(…*?)\", line ([0-9]*)",
"working_dir": "$file_path",
"selector": "source.go"
}

Sublime Text 中运行Java

sublime配置java运行环境

配置

具体设置:Preferences -> Settings

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
// 代码提示
"auto_complete": true,
// 代码自动补全
"auto_match_enabled": true,
// 默认编码格式
"default_encoding": "UTF-8",
// 默认文件格式
"default_line_ending": "unix",
// 字体格式
"font_size": 15,
"ignored_packages":
[
"Vintage"
],
// tab 等于4个空格
"tab_size": 4,
// 主题
"theme": "Nil.sublime-theme",
// tab等于空格
"translate_tabs_to_spaces": true,
// 更新检查
"update_check": false,
// 自动换行
"word_wrap": true,
// 打开文件是新开窗口
"open_files_in_new_window":false,
// 自动保存
"save_on_focus_lost": true,
// 光标所在行高亮
"highlight_line": true,
}

弹窗

升级检查

升级检查,配置中开启了"update_check": false,还是会弹窗,官方说未注册版该配置不起左右。

1
2
3
4
5
6
7
[Window Title]
Update Available

[Main Instruction]
A new version of Sublime Text is available, download now?

[Download] [取消]

解决方法,输入注册码,屏蔽检查升级和激活码检查域名

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# 抓包获取到的URL
# 升级检查
https://www.sublimetext.com/updates/3/stable/updatecheck?
version=3207&platform=windows&arch=x64&r=0&now=1581751863&m=0uM6
返回
{
"latest_version": 3211,
"update_url": "https://www.sublimetext.com/3",

"manifest_host": "www.sublimetext.com",
"update_host": "download.sublimetext.com",

"manifest_path_osx": "/_pak/sublime_text_osx_3211.manifest.xz",
"update_path_osx": "/sublime_text_osx_3211.pak.xz",

"manifest_path_windows_x64": "/_pak/sublime_text_windows_x64_3211.manifest.xz",
"update_path_windows_x64": "/sublime_text_windows_x64_3211.pak.xz",

"manifest_path_windows_x32": "/_pak/sublime_text_windows_x32_3211.manifest.xz",
"update_path_windows_x32": "/sublime_text_windows_x32_3211.pak.xz"
}

# 注册码检查
https://license.sublimehq.com/check/
b8a9b476617a5e9c3d9a32d31cdbfff0eaa65c34d79f104585d107de945d6cf1
?n=811825&b=3207&m=0uM6AbD-V07q1ad98FDoLQ
返回
{
"status": "shared"
}

1.注册方式:帮助,输入激活码,粘贴下面的注册码(若失效请自行搜索最新版,博主亲测v3.2.1build3207可用),Use License,取消

1
2
3
4
5
6
7
8
9
10
11
ZYNGA INC.
50 User License
EA7E-811825
927BA117 84C9300F 4A0CCBC4 34A56B44
985E4562 59F2B63B CCCFF92F 0E646B83
0FD6487D 1507AE29 9CC4F9F5 0A6F32E3
0343D868 C18E2CD5 27641A71 25475648
309705B3 E468DDC4 1B766A18 7952D28C
E627DDBA 960A2153 69A2D98A C87C0607
45DC6049 8C04EC29 D18DFA40 442C680B
1342224D 44D90641 33A3B9F2 46AADB8F

注册方式

[Window Title]
License upgrade required

[Main Instruction]
Hello! Thanks for trying out Sublime Text 3!

Sublime Text 3 is a paid upgrade from Sublime Text 2, and your license key is for Sublime Text 2.

Would you like to upgrade your license now?

[Upgrade] [取消]

注册方式

2.在C:\Windows\System32\drivers\etc\host加入以下屏蔽内容

1
2
3
4
0.0.0.0 www.sublimetext.com
0.0.0.0 sublimetext.com
0.0.0.0 license.sublimehq.com
0.0.0.0 sublimehq.com

注册码失效

1
2
3
4
5
6
7
---------------------------
Sublime Text
---------------------------
Your license key is no longer valid, and has been removed
---------------------------
确定
---------------------------

解决方法:在C:\Windows\System32\drivers\etc\host加入以下屏蔽内容

1
2
3
4
0.0.0.0 www.sublimetext.com
0.0.0.0 sublimetext.com
0.0.0.0 license.sublimehq.com
0.0.0.0 sublimehq.com

更新

  • 2020年2月15日-添加屏蔽更新,注册码检查

参考