本文最后更新于 2025年5月1日 上午
介绍 此教程用于Windows 下Sublime Text4 4192版本的安装和激活。
无需安装其他软件,无需下载替换文件,无需注册机等。
官网: https://www.sublimetext.com
下载地址 https://download.sublimetext.com/sublime_text_build_4192_x64_setup.exe
手动激活 默认安装路径:C:\Program Files\Sublime Text
安装之后,使用sublime text 打开安装目录下的sublime_text.exe文件。
Ctrl + F 搜到到
更改为
然后另存到其他路径,然后关闭sublime text,将原sublime_text.exe进行替换即可。
检查激活状态 点击菜单栏 Help—>About Sublime Text 可检测激活状态。
软件安装中文语言包 1、点击菜单栏Tools—>Install Package Control 跳出弹框点击 确定按钮
2、点击菜单栏 Preferences – Package Control
3、弹框中输入 install package,选中 Package Control: Install Package 然后等待弹窗(可能需要耐心等待一段时间)
4、等出现如下弹窗后, 在弹窗的搜索框中输入 ChineseLocalizations , 点击出现的选项
5、等待一段时间,如果出现了如下画面则汉化步骤全部完成
6、后续若需要更改,可点击菜单栏 帮助-–>Language 选择进行更改。
使用Powershell 快速修改激活 - 要确保Sublime Text 已关闭 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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 Add-Type -TypeDefinition @" using System; public static class ByteArrayExtensions { // 在 source 中查找 needle 第一次出现的位置,找不到返回 -1 public static int IndexOf(byte[] source, byte[] needle, int startIndex) { int len = source.Length; int needleLen = needle.Length; if (needleLen == 0 || len == 0 || needleLen > len) return -1; int limit = len - needleLen; for (int i = startIndex; i <= limit; i++) { bool matched = true; for (int j = 0; j < needleLen; j++) { if (source[i + j] != needle[j]) { matched = false; break; } } if (matched) return i; } return -1; } } "@ function Replace-ByteSequence { param ( [string ]$FilePath , [byte []]$OldSequence , [byte []]$NewSequence ) if ($OldSequence .Length -ne $NewSequence .Length) { Write-Error "旧字节序列和新字节序列长度必须相同!" return } [byte []]$bytes = [System.IO.File ]::ReadAllBytes($FilePath ) $replacements = 0 $pos = 0 while ($true ) { $index = [Byte Array Extensions ]::IndexOf($bytes , $OldSequence , $pos ) if ($index -lt 0 ) { break } for ($i = 0 ; $i -lt $NewSequence .Length; $i ++) { $bytes [$index + $i ] = $NewSequence [$i ] } $replacements ++ $pos = $index + $OldSequence .Length } [System.IO.File ]::WriteAllBytes($FilePath , $bytes ) Write-Host "共替换 $replacements 处。" }$filepath = "C:\Program Files\Sublime Text\sublime_text.exe" $oldSeq = 0 x80, 0 x79, 0 x05, 0 x00, 0 x0F, 0 x94, 0 xC2$newSeq = 0 xC6, 0 x41, 0 x05, 0 x01, 0 xB2, 0 x00, 0 x90 Replace-ByteSequence -FilePath $filepath -OldSequence $oldSeq -NewSequence $newSeq
技术交流群 发送邮件到 ➡️ [email protected]
或者关注WX公众号:网工格物