As simple as the concept of a text editor seems, there are still many options to be considered when creating one. JujuEdit was orginally conceived as an embeddable control for editing my toy script language (JujuScript), in order to support basic things like undo buffers and smart indenting (which a standard edit control does not). But then I started thinking of other features that might be useful in a text editor and so the project grew and grew. All in all it’s been almost a year since I started work on it, which seems like a disturbingly long time now that I think about it.
The central design decision (which may make JujuEdit unique) is that the editor does not "convert" the text on input into an internally neat format. While complicating the programming to a large degree, this method has some major advantages:
-
Non destructive – Loading a file with unusual characters (such as null bytes) will not cause JujuEdit to spaz out in the slightest. On the contrary, JujuEdit will behave perfectly. To get an idea of the sort of flexibility this gives you, it means that you could open an exe (full of nasty bytes that can make a normal text editor choke) and modify a single piece of text, then save it again… and it will still run!
-
Instant loading – Because there is no conversion, a large file can be accessed directly. When a file is fully loaded into RAM (default for files less than 10Mb), it will take up the same amount of space in memory as on disk.
-
WYSIWYS – "What you see is what you store" If you paste unicode text while in ASCII view mode, if you choose to stay in 8-bit mode you will see the extended characters replace with ?, just as they would be on save.
-
Debugging/Trouble Shooting – if you have a data file which is corrupted you can edit different parts in different ways (some as Unicode, others as binary etc)