annotate runtime/macros/hanoi/hanoi.vim @ 6060:72ee0db83788 v7.4.369

updated for version 7.4.369 Problem: Using freed memory when exiting while compiled with EXITFREE. Solution: Set curwin to NULL and check for that. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Wed, 16 Jul 2014 16:30:28 +0200
parents 3fc0f57ecb91
children bdda48f01a68
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 set remap
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 set noterse
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 set wrapscan
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " to set the height of the tower, change the digit in the following
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " two lines to the height you want (select from 1 to 9)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 map t 7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 map! t 7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 map L 1G/t X/^0 $P1GJ$An$BGC0e$X0E0F$X/T @f @h $A1GJ@f0l$Xn$PU
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 map g IL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 map J /^0[^t]*$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 map X x
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 map P p
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 map U L
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 map A "fyl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 map B "hyl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 map C "fp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 map e "fy2l
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 map E "hp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 map F "hy2l
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " initialisations:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " KM cleanup buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 " Y create tower of desired height
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " NOQ copy it and inster a T
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " NO copy this one
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " S change last char into a $
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " R change last char in previous line into a n
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " T insert two lines containing a zero
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " V add a last line containing a backslash
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 map I KMYNOQNOSkRTV
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 "create empty line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 map K 1Go
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 "delete to end of file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 map M dG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 "yank one line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 map N yy
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 "put
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 map O p
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 "delete more than height-of-tower characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 map q tllD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 "create a tower of desired height
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 map Y o0123456789Z0q
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 "insert a T in column 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 map Q 0iT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 "substitute last character with a n
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 map R $rn
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 "substitute last character with a $
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 map S $r$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 "insert two lines containing a zero
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 map T ko0 0 
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 "add a backslash at the end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 map V Go/