blob: dd03b2613d1d98e84ad44aa9cca9750860df14b4 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001Article 2913 of alt.sources:
2Path: oce-rd1!hp4nl!mcsun!uunet!munnari.oz.au!metro!cluster!swift!softway!otc!gregm
3From: gregm@otc.otca.oz.au (Greg McFarlane)
4Newsgroups: comp.sources.d,alt.sources,comp.editors
5Subject: VI SOLVES HANOI
6Message-ID: <2323@otc.otca.oz>
7Date: 19 Feb 91 01:32:14 GMT
8Sender: news@otc.otca.oz
9Reply-To: gregm@otc.otca.oz.au (Greg McFarlane)
10Organization: OTC Development Unit, Australia
11Lines: 80
12Xref: oce-rd1 comp.sources.d:5702 alt.sources:2913 comp.editors:2313
13
14Submitted-by: gregm@otc.otca.oz.au
15Archive-name: hanoi.vi.macros/part01
16
17Everyone seems to be writing stupid Tower of Hanoi programs.
18Well, here is the stupidest of them all: the hanoi solving vi macros.
19
20Save this article, unshar it, and run uudecode on hanoi.vi.macros.uu.
21This will give you the macro file hanoi.vi.macros.
22Then run vi (with no file: just type "vi") and type:
23 :so hanoi.vi.macros
24 g
25and watch it go.
26
27The default height of the tower is 7 but can be easily changed by editing
28the macro file.
29
30The disks aren't actually shown in this version, only numbers representing
31each disk, but I believe it is possible to write some macros to show the
32disks moving about as well. Any takers?
33
34(For maze solving macros, see alt.sources or comp.editors)
35
36Greg