Yes, I hadn't noticed it, but John Horton Conway died a few days ago.
To load the "game of life" mappings once Vim is up,
:runtime macros/life/life.vim
then (in Normal mode) either g (go); or I (uppercase i for initialize)
followed by either C (compute one step) or R (run). After I you can
edit the left field to change the seed.
Note: AFAICT, once you have started computing all successive
generations recursively by g or R, there's no way to stop the
automaton short of killing Vim.
Best regards,
Tony.
On Wed, Apr 15, 2020 at 3:27 AM Eli the Bearded <vim@eli.users.panix.com> wrote:
>
> Many years ago I wrote Conway's Game of Life in vi macros.
> Not vimscript, macros. I posted them, uuencoded, to comp.editors
> where you might still find them with Google Groups searches.
>
> But Bram Moolenaar liked the effort, so you can still find those
> macros easily. On my Ubuntu system, they are installed at:
>
> $VIM/vim80/macros/life/life.vim
>
> (Where $VIM is set by vim itself, so ":e $VIM/..." to edit and
> ":so $VIM/..." to source, but don't use that on the command line.)
>
> After sourcing it, you can hit "I" to initialize the board, edit
> the text in the box that says "VIM LIVES":
>
> top---------------------------------------------------------------
> - --....................--....................-
> - --....................--....................-
> - --....................--....................-
> - VIM --....................--....................-
> - --....................--....................-
> - --....................--....................-
> - LIVES --....................--....................-
> - --....................--....................-
> - --....................--....................-
> - --....................--....................-
> ------------------------------------------------------------------
>
> (which will probably be below your cursor point) then "R"un the game.
> <control-C> to interrupt it.
>
> The game plays only in that left hand box, everything else before
> and after it is there to make the game run faster by storing state
> and tables in the edit buffer. Bram tweaked the game somewhat, such
> as have the letter of the alphabet indicate age, with old letters
> just dying.
>
> The macros are well documented, and were originally written for the vi
> on my Solaris box at the time. That program was buggy and would forget
> marks after a while, which would exit the game with an error. vim
> never had that problem.
>
> It's a rather CPU intensive way to play the Game of Life, whether
> you use vi, vim, nvi, or elvis.
>
> Elijah
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/4924VK1FyMzfYt%40panix5.panix.com.
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXv-TpDnfga_hcTcBJq05AFAZWBgyuYBUd18OCPSPoStOQ%40mail.gmail.com.
Tuesday, April 14, 2020
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment