Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / usr / share / vim / vim74 / macros / urm / | server ip : 172.67.156.115 your ip : 108.162.241.113 H O M E |
Filename | /usr/share/vim/vim74/macros/urm/README.txt |
Size | 1.54 kb |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 27-Apr-2025 09:56 |
Last modified | 03-Jan-2014 03:40 |
Last accessed | 07-Jul-2025 01:08 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
This is another proof that Vim is perfectly compatible with Vi.
The URM macro package was written by Rudolf Koenig ("Rudi")
([email protected]) for hpux-vi in August 1991.
Getting started:
type
in your shell: vim urm<RETURN>
in vim: :so urm.vim<RETURN>
in vim: * (to load the registers and boot the URM-machine :-)
in vim: g (for 'go') and watch the fun. Per default, 3 and 4
are multiplied. Watch the Program counter, it is
visible as a komma moving around.
This is a "standard URM" (Universal register machine) interpreter. The URM
concept is used in theoretical computer science to aid in theorem proving.
Here it proves that vim is a general problem solver (if you bring enough
patience).
The interpreter begins with register 1 (not 0), without macros and more-lines
capability. A dot marks the end of a program. (Bug: there must be a space
after the dot.)
The registers are the first few lines, beginning with a '>' .
The program is the first line after the registers.
You should always initialize the registers required by the program.
Output register: line 2
Input registers: line 2 to ...
Commands:
a<n> increment register <n>
s<n> decrement register <n>
<x>;<y> execute command <x> and then <y>
(<x>)<n> execute command <x> while register <n> is nonzero
. ("dot blank") halt the machine.
Examples:
Add register 2 to register 3:
(a2;s3)3.
Multiply register 2 with register 3:
(a4;a5;s2)2; ((a2;s4)4; s3; (a1;a4;s5)5; (a5;s1)1)3.
There are more (complicated) examples in the file examples.
Note, undo may take a while after a division.
The URM macro package was written by Rudolf Koenig ("Rudi")
([email protected]) for hpux-vi in August 1991.
Getting started:
type
in your shell: vim urm<RETURN>
in vim: :so urm.vim<RETURN>
in vim: * (to load the registers and boot the URM-machine :-)
in vim: g (for 'go') and watch the fun. Per default, 3 and 4
are multiplied. Watch the Program counter, it is
visible as a komma moving around.
This is a "standard URM" (Universal register machine) interpreter. The URM
concept is used in theoretical computer science to aid in theorem proving.
Here it proves that vim is a general problem solver (if you bring enough
patience).
The interpreter begins with register 1 (not 0), without macros and more-lines
capability. A dot marks the end of a program. (Bug: there must be a space
after the dot.)
The registers are the first few lines, beginning with a '>' .
The program is the first line after the registers.
You should always initialize the registers required by the program.
Output register: line 2
Input registers: line 2 to ...
Commands:
a<n> increment register <n>
s<n> decrement register <n>
<x>;<y> execute command <x> and then <y>
(<x>)<n> execute command <x> while register <n> is nonzero
. ("dot blank") halt the machine.
Examples:
Add register 2 to register 3:
(a2;s3)3.
Multiply register 2 with register 3:
(a4;a5;s2)2; ((a2;s4)4; s3; (a1;a4;s5)5; (a5;s1)1)3.
There are more (complicated) examples in the file examples.
Note, undo may take a while after a division.