I’ll want my text editor to be able to internally “mark” words and phrases and characters within the text. Here I discuss the basics of a system for doing this. I’ll need this system to implement such features as syntax highlighting, background spellchecking, bookmarks, and highlighting the results of previous searches.
My text editor has to have a way to store text in memory. REALbasic provides two classes for this: String and MemoryBlock. For my purposes, MemoryBlock is better.
My text editor is going to need a buffer system. What I want is a buffer that offers features like the following: the ability to attach “tags” to specific words or phrases within the text, the ability to record changes (and thus allow both undo and macro recording), the automatic saving of changes to temporary files, and the ability to handle files too large to load into memory.
I want to roll my own text control, because the text control that comes with REALbasic doesn’t offer the feature set I want.
My current plan is to write my text editor in REALbasic. REALbasic as a language is easy to learn, easy to write, and easy to read. You can create your own GUI controls, you can compile your application for Windows and Linux and the Mac all at once, and you can even write plugins for REALbasic in C++ if REALbasic isn’t fast enough.
I want to write my own text editor because I am not completely satisfied with other text editors I’ve used, and because I have some ideas for features I’d like to see in a text editor.
I decided to start a blog. It would be cool to be able to write about what I’ve read or learned about something and then have casual visitors with similar interests drop by and comment.