Years ago replacing Notepad with an alternative was a given and everybody had their favourite. Before UTF everywhere you needed at least proper character encoding handling, other features followed.
Surprisingly, some of the projects such as AkelPad are still alive.
Win32 made things easier, as well as things like Delphi and Scintilla later.
Just checked my archives, and my own naive but functioning attempt measures whole whopping 36520 bytes, though not without the help of an executable packer, which was a fashion then.
Mostly works fine under Wine, though it is about the legal US drinking age.