2
3
Fork
You've already forked aed
0
A more interactive (albeit heretical) ed experience
  • Shell 60.8%
  • Makefile 39.2%
2026年05月14日 07:34:03 +04:00
assets assets: Add screenshots 2025年08月28日 00:53:27 +04:00
build build/bsd-preprocess-word-boundaries: Process meta-generated word boundaries too 2026年01月19日 20:43:54 +04:00
aed aed: Use LINES variable for scrolling control 2026年04月04日 05:21:49 +04:00
aed_code_coloring coloring.ed: Rename to code_coloring.ed 2026年01月14日 22:57:13 +04:00
aed_markup_coloring markup_coloring: More 2026年01月14日 23:24:31 +04:00
code_coloring.ed code_coloring(do): Also color the derived forms (dotimes etc.) 2026年02月03日 03:34:25 +04:00
inputrc inputrc(C-x i): Fix to allow initial zero indentation, use 2 spaces 2026年05月12日 23:54:44 +04:00
isv.ed isv.ed: Also list example use for words having it 2026年04月04日 05:20:34 +04:00
makefile overview: Add file overview functionality 2026年04月23日 15:51:27 +04:00
markup_coloring.ed markup_coloring: Remove barred highlight and make the rest multiple-substition 2026年01月27日 00:23:07 +04:00
overview.ed overview: Add file overview functionality 2026年04月23日 15:51:27 +04:00
README.md README: Update xed call with more recent output 2026年05月14日 07:34:03 +04:00
xed xed: Auto-write after script execution 2026年01月07日 11:13:19 +04:00

aed(1) is a more interactive ed(1)

Of course, it stands for "aartaka’s ed." (Or is it just me liking æspa? Should it be æd then? Sounds cool, actually.)

The features are:

  • Colorful contextual prompt
  • Syntax highlighting
  • Readline
    • Custom commands/macros
    • Slashes as word separators
    • History of commands

Here’s how aed’s syntax highlighting looks:

Example of C code Example of Lisp code Example of Lamber code

Overall, aed is a comfier version of ed. Yet, aed is not trying to rewrite or re-implement any part of ed. All the changes are non-invasive, focusing on e.g. Readline wrapping. In most regards, aed behaves exactly like ed.

Getting Started

Clone the repo

git clone https://codeberg.org/aartaka/aed
cd aed

Then you can install aed (and xed, see below)

make install

Bear in mind these side-effects:

  • It creates ~/.local/bin/ and aed + aed*coloring scripts in it
    • So that you can prepend ~/.local/bin to your PATH in e.g. .bashrc:
export PATH="${HOME}/.local/bin:${PATH}"
  • It also puts xed (see below) into ~/.local/bin/
  • It puts some auxiliary files into .local/share/aed/:
    • *_coloring.ed that’s used for syntax highlighting

    • inputrc that you can include into your actual .inputrc

      $include ~/.local/share/aed/inputrc

What’s xed

xed (for "executing ed") comes bundled with aed. It’s a wrapper for ed that’s much easier to invoke in scripts. Say, instead of grep or sed:

$ xed "g|aed|p" aed
mkdir -p /tmp/aed/
 cp 1ドル /tmp/aed/$filename-completions
 touch /tmp/aed/$filename-completions
echo "This is aartaka's aed, enjoy!"
 -C aed \
 -z "outfilter aed_code_coloring" \
 -f /tmp/aed/$filename-completions \
 -C aed \
 -z "outfilter aed_markup_coloring" \
 -f /tmp/aed/$filename-completions \
 -C aed \
 -f /tmp/aed/$filename-completions \

The first arg is either

  • A printf-ready format string (meaning you can do escape sequences like \n and inject vars)
  • Or a name of the .ed file to execute

The (optional) second, third, fourth etc. arguments are files to act on. If they are not provided, xed acts on standard input, much like sed.

aed’s prompt might be implemented with xed too. Instead of

dirname=$(printf "a
1ドル.
g|/|s|.*/||
p
Q\n" | ed -s)

one might use

# echo here is a gag for xed to not wait for stdin
dirname=$(echo "" | xed "a\n1ドル\n.\ng|/|s|.*/||\np")