This is going to look like other fixes people have come up with, but it isn’t, wait till the end.
I’ve read lots of forum posts on replacing notepad and tried using the sublime launcher, which doesn’t work, and a bunch of other garbage. Forget about all of it.
Here’s how you do it without a launcher and without it going crazy when a filename or path has spaces.
Go to this registry key, if a notepad.exe doesn’t exist create one.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe
Create a new string value named “Debugger” if it already exists just modify it
Set the value as shown below
C:\Program Files\Sublime\sublime_text.exe -z "
Notice the single un-closed quote, that’s the secret.
Hopefully this post will help someone who went on the same snipe hunt I did.