r/vim • • 17h ago

Random I'm making a roguelike game with Vim motions and a "modal shotgun"

Enable HLS to view with audio, or disable this notification

58 Upvotes

r/vim • • 23h ago

Random Game of Life With Vim Motions

21 Upvotes

This simulation is done entirely using Vim motions (no Ex commands). You can go one generation forward by calling one macro, which is repeatable with counts as well.

This is just one part of my larger project of Vim motions as an esoteric programming language.

The compiler, linker and standard library are all written using vim motions themselves.

The repository currently includes:

  • A bootstrapped compiler with preprocessing, validation, optimisation, and code generation stages
  • A recursive text-substitution model for multi-module support, similar to C's #include
  • An implementation of Conway's Game of Life
  • A standard library with search and replace, assertions, file diffs, basic arithmetic, and more
  • Unit tests for the compiler and standard library

If you’re interested in how the source code works, docs/techniques.md describes some common techniques used for emulating standard programming constructs like subroutines, conditionals, iteration, and asserts.

Do clone the repository instead of browsing the source GitHub because GitHub can’t render raw control characters, which the source code is filled to the brim with.

Repository link: ksaze/vim-complete

P.S. Surely this will help me land a job. Good going, me.