Sandy text editor
Sandy is a X11 text editor with an easy-to-read, hackable C source. It uses GTK+ and GtkSourceView for convenience and is akin to surf, only it is a text editor, not a web browser. Sandy tries to maximize screen estate, minimize the SLOC used and not get in your way too much. It can somehow be controlled via XProperties and all preferences and keybindings are to be chosen at compile time. Two example configs are provided with the source.
Next, the mandatory screenshot of sandy 0.1 running in a dwm session.
Some thoughts about the features and qualities that sandy has/has not:
- Why X11?
- We thought it was pointless to build yet another curses text editor. There are plenty of them and you are likely to be using a X11 environment anyway. Sure an X11 editor is not specially useful to edit remote files, but you can probably access that file through a remote filesystem anyways. Also, ed is the standard UNIX editor; feel free to use it anywhere.
- Why using a toolkit?
- To avoid reinventing the wheel. There are places other than an editor where a text buffer widget can be useful, and using the same text widget in your editor and in the rest of your programs just felt right.
- Why on earth GTK+?
- Because AFAIK there is no other real, modern toolkit written in plain old C out there (if there is, let us know). We could have gone for statically linked FLTK, but C++ is ugly. Also, most people using a standard web browser already have GTK+ loaded as a shared library. Finally, setting up somehow-emacs-like keybindings in GTK+ is easy and works both in sandy and other GTK+ apps.
- Why GtkSourceView?
- Convenience. GtkSourceView is fairly standard and provides a good enough syntax and current line highlighting, line numbers, multi-level undo, autoindenting and whatnot. We were going for most of those anyways, so... why not?
- Will you ever get rid of any of those big ugly dependencies?
- If we have the time to do so, we may implement most of the GtkSourceView features we use in a simpler way and drop it as a dep. Later on, if we find a sane alternative to GTK+ we might go that way.
The name "sandy" is not a twisted acronym nor has anything to do with text editing. Sandy was one of our lovely pet ferrets. She was specially smart and playful, but unfortunately she died right before we started coding this. For the really nostalgic there is a pic here.
Feel free to contact email@example.com for comments, patches, etc.