vi: solves a maze!

I didn't believe it either, just like I didn't believe the car-goat-goat problem, until my friend Rob sent me a tar file containing a vi macro that changed my life.

A long time ago, in a newsgroup far far away...


Submitted-by: Greg McFarlane
Posting-number: Volume 17, Issue 9
Archive-name: maze-via-vi/part01

A real working model. See it walk the maze in front of your very own eyes.

To prove that you can do anything in vi, I wrote a couple of macros that allows vi to solve mazes. It will solve any maze produced by maze.c that was posted to the alt.sources last month. (Maze.c is also included in this posting as well as an example of its output.)

The uncommented version of the macros was sent to alt.sources last month. However, so many people mailed me requesting the commented version of the macros that I decided to post it. I have made some modifications to the original macros to make them easier to follow and also after I learnt that you can escape the special meaning of '|' in macros by using '^V|'.

After studying these macros, anyone who cannot write an emacs emulator in vi macros should just curl up and :q!.

Greg


So that's the article, and sure enough, the source is there in volume 17, issue 9 of my favorite comp.sources.misc archive: ftp.uu.net. Click here to get your very own copy! The file comes in as part01.Z, so make sure you don't already have a file by that name when you download it.
vi evangelical series / corby@intuit.com
January 1995 (updated April 6, 1998)