edd
is my attempt at writing the ed text-editor from scratch.
Initially, I was planning to only write a subset of ed, but ended up writing
it in its entirety. I decided it would
be nice to have some extra features like:
- Unlimited undos and redos.
- Hot swappable prompt string.
Future features:
- Line editing with readline or linenoise.
- "edit current line"
edd
shares its syntax and idiosyncracies (to some extent) with ed. The ed
manual (or man ed
)
sufficiently describes and explains how ed
and, by extension, edd
, works.
-
There are no special commands (
h
andH
) for "Error Explanations," errors are succintly explained as they occur. -
Syntax is liberal. For example,
s/RE/SUBS/FLAG
is legal ined
buts /RE/SUBS/FLAG
is not. Inedd
, however, this is allowed.edd
allows any number of space (or tabs) between commands and their arguments. -
Command
l
has been omitted. -
Command
U
does redos. -
Like
ed
, recursively calling any global command (g,G,v,V) is prohibited. This, however, does not prevent the parent global command to execute all the legal commands that come before it. For example,
g/RE/a \
line 1\
line 2\
.\
g/RE/
will append "line 1" and "line 2" but signal an error for illegal command in the command list once it encounters 'g'.
-
edd
does not support all command line options thated
does.edd -h
lists available options. -
Like
ed
, the prompt string can be set with the-p
option. And while the program is running, can be changed with theP
command.P arg
sets the current prompt toarg
. "Hot swappable prompt string" is a fancy description of this feature.
git clone https://github.com/bojle/edd.git
cd edd
make
sudo make install
make clean
cd dir/where/you/installed/edd
make unistall
- Add features mentioned in the future features section.
- Thorough testing.
Report bugs at https://github.com/bojle/edd/issues.
Any improvement ideas are welcome.