Skip to content

Instantly share code, notes, and snippets.

@deyixtan
Last active February 16, 2024 00:13
Show Gist options
  • Star 92 You must be signed in to star a gist
  • Fork 12 You must be signed in to fork a gist
  • Save deyixtan/6822b66ad7792ab2580ba37c450ae79c to your computer and use it in GitHub Desktop.
Save deyixtan/6822b66ad7792ab2580ba37c450ae79c to your computer and use it in GitHub Desktop.
Sublime Text Patching Guide

Automated Patching

Download slt.py python script (supports multiple build) from this repository.

Usage

python slt.py <"sublime_text file path">


Manual Patching

Download already patched executable or perform hex edit with the information shown below.

Build 3176

Windows 32-bit

Name Offset Original Patched
Persistent License Check 0x267CA 0x00 0x01
Initial License Check 0x26C4F 0x38 0x08
0x26C50 0x00 0x01
Software Update Prompt 0x50AFA 0x55 0xC3

Windows 64-bit

Name Offset Original Patched
Persistent License Check 0x3985A 0x00 0x01
Initial License Check 0x3A073 0x38 0x08
0x3A074 0x00 0x01
Software Update Prompt 0x792FB 0x57 0xC3

Linux 32-bit

Name Offset Original Patched
Persistent License Check 0xD779 0x00 0x01
Initial License Check 0xC068 0x38 0x08
0xC069 0x00 0x01
Software Update Prompt 0x482C5 0x83 0xC3
0x482C6 0xEC 0x90
0x482C7 0x0C 0x90

Linux 64-bit

Name Offset Original Patched
Persistent License Check 0xEB83 0x00 0x01
Initial License Check 0xD538 0x38 0x08
0xD539 0x00 0x01
Software Update Prompt 0x460B5 0x53 0xC3

@harry-cn1210
Copy link

https://gist.github.com/rufoa/78e45d70f560f53678853c92dae2598a
Can anyone port this submerge v2039 from Linux to Windows?

@ehsan18t
Copy link

Windows x64 SubMerge v2026dev

Offset		Original	Patched		Context
------		--------	-------		-------
0x29C22		0x25		0x0D		96 00 66 83 [25] 00 BD
0x2A82A		0x38		0x08		48 8B 86 B0 02 00 00 80 [38]
0x2A82B		0x00		0x01		48 8B 86 B0 02 00 00 80 [38] [00] 74
0x2F813		0x00		0x01		FF 48 89 F8 48 83 C4 28 5F 5E C3 C6 01 [00] C3 CC 48 83

Tested and working, dark and light themes, etc. Use context to find the offset in HXD

EDIT: I've tried adapting the offsets from SubText 3 to SubText 4 beta build 4079 (binaries available on the official Discord), but have had no luck. FWIW, here's the updated offsets (NB they do Not work

Windows x64 Sublime Text 4 beta build 4079 (DOES NOT WORK)
17/07/2020

Offset		Original	Patched		Context
------		--------	-------		-------
0x007CE5	0x84		0x85		00 80 3E 00 0F [84] 7E 01 00 00 B8 00 02 00 00 66
0x0A2AAA	0x75		0xEB		C3 56 48 83 EC 20 80 39 00 [75] 3C E8 23 19 08
0x1F6849	0x75		0x74		37 F1 FF 41 F6 C4 02 [75] 1E 41 F6 C4 04 75 41 41

Can you help with sublime merge 2 build 2047 please?

@maboloshi
Copy link

maboloshi commented Mar 16, 2021

@naml3i
Copy link

naml3i commented Jun 4, 2021

There is no news since version 4? i.e. 4107?

Besides, does anyone experience ST lost all user settings after upgrading to v4107?

@lahma0
Copy link

lahma0 commented Jun 16, 2021

@naml3i Yes, I experienced the same thing. I used the automatic updater (in-app popup notifying me there was an update available and clicking download) and after the update, "Poof!", everything was wrecked. I keep a lot of valuable documents/notes open in my current session, some saved, some not, so I was definitely not at all pleased when my session data was completely discarded. Thankfully, I was able to restore everything since I had a backup but it is EXTREMELY poor form on the app author's behalf to do something so reckless. If this was a result of transitioning from Sublime Text 3 to Sublime Text 4, then the app should either not offer the update at all, or it should give a very clear warning that the update is a major version update which is not backwards compatible and that it will discard much, if not all, of your user data. It is almost as if they are just TRYING to push more people into Microsoft's VSCode arms. At least that is my 2-cents...

@naml3i
Copy link

naml3i commented Jun 23, 2021

@naml3i It is almost as if they are just TRYING to push more people into Microsoft's VSCode arms. At least that is my 2-cents...

@lahma0 I've been a big fan of VSCode for years. Way better than ST although it's still not a full-fledge IDE, but it serves as an IDE better than ST. VSCode took the (great) idea of json settings file in ST, but did it better with extensions and constant improvement, and it's free (!) while ST asks 99$ for an alternative to Notepad.
While I can enjoy the changes VSCode after each major update, I don't see that much in ST, what's the major difference between ST3 and ST4? They claim that it offers new "features", but for example a simple feature I still don't see them implement: choosing the language right when we draft. VSCode allows us to choose the language beforehand, no need to save the file with the right extension to have syntax highlighting. This is extremely helpful if we open a blank file and paste a code from somewhere else just to investigate it.

Instead, what did they give us in ST4? A broken setting file, incompatible with ST3; a non-blinking caret by default, with the reason that non blinking caret saves power (?!).

From ST2 to ST3, or at some version of ST3, a lot beautiful themes was also removed (?) Why, ST Headquarter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment