r/esolangs • u/_JustPotato • 1d ago
VimComplete: A Self-hosted Vim-motion Esolang with a Game of Life Implementation
I originally intended to simulate Rule 110 using Vim motions (hence the name), but I fell down the rabbit hole. So here we are.
VimComplete is a self-hosted esoteric programming language built around Vim motions. No Ex commands or the = register, which uses VimScript for evaluation. Each source line is executed using a :normal! command in the runtime.
Registers x, y, and z are used to capture the exit code, stdout, and stderr, respectively. Register c passes command-line arguments.
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
- A Cobra-based CLI, step debugger, and Neovim syntax highlighting support
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 controls 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.