The BSD berkeley learn utility in the course on ex teaches that vi is a subset of ex. At the time 1990 when I used that utility everything possible with vi could be done with ex but the same couldn't be said for the reverse case. That ex tutorial then proceeded to demonstrate quite a lot of commands that work fine in ex but won't work in vi. A cut down version of both is ed (a little bit better than edlin) if you remember dos but not much. I had goot luck with ex and emacs and e2. One note about Tiger 10.4 and very probably leopard 10.5 for terminal users, you can run ex on the mac in terminal mode. I did it setting up mysql.