Skip to content

KeyForge: The Tower Defense Game That Taught Me to Actually Use Vim (And Why That Matters More Than Ever)

TL;DR

AI agents like Cursor, Claude Code, and Copilot are writing 95% of our code now. The new essential skill isn’t typing more code, it’s reading and navigating it faster. Vim keybindings are the fastest way to do that, but the learning curve is brutal. So I built KeyForge, a tower defense game that teaches you vim through actual gameplay. Fight bugs with keystrokes, earn gold by completing editing challenges, and finally master those keybindings you’ve been putting off for years.


Introduction

I’ve started and quit learning vim keybindings at least seven times over the past five years.

Every time, the cycle was the same. I’d get hyped watching some YouTube video of a developer flying through code at light speed. I’d install a vim plugin in my editor. I’d spend two weeks moving like I was coding underwater. Then I’d give up and go back to my mouse.

The problem wasn’t motivation. The problem was that learning vim felt like doing homework. Flashcards. Cheat sheets. Typing :wq fifty times in a row until it stuck. It was boring, there was no clear progression, and worst of all, there was no immediate payoff.

Then something shifted in how I write code. And suddenly, learning vim went from „nice to have“ to absolutely critical.


AI Writes the Code Now. You Navigate It.

Here’s the uncomfortable truth about software engineering in 2025: if you’re still writing most of your code by hand, you’re doing it wrong.

Claude Code, Cursor, GitHub Copilot, and a dozen other AI coding agents can write 95-100% of the boilerplate, the CRUD endpoints, the Redux reducers, the database migrations, and even the tricky algorithmic stuff. They do it faster than you. And honestly, they do it pretty well.

But here’s the catch. These tools don’t replace you. They shift your job.

Your job isn’t to type code anymore. Your job is to read what the AI wrote, spot where it went off the rails, steer it back on track, and make those small surgical edits that turn „pretty good“ into „actually works.“

That means you’re reading way more code than you’re writing. You’re jumping between files. You’re scanning function definitions. You’re searching for that one variable name buried in a 500-line component. You’re checking if the AI remembered to handle the edge case you mentioned three prompts ago.

And if you’re doing all that with a mouse and arrow keys, you’re gonna have a bad time.


Vim Is Fast. Really, Really Fast.

I used to think vim was just elitist nerd stuff. A way for terminal purists to feel superior while the rest of us got actual work done.

Then I watched a senior engineer at my last job navigate a 10,000 line codebase. No mouse. Just keystrokes. He’d jump to a function definition, scan the arguments, hop to where it’s called, refactor the name across 12 files, and commit it, all in about 15 seconds.

It wasn’t magic. It was just vim keybindings.

Once you internalize the language of vim (motions, operators, text objects), navigating and editing text stops being a deliberate act. It becomes muscle memory. You think „delete everything inside these quotes“ and your fingers type di" before your brain finishes the sentence.

It’s not just fast. It’s fluid. You stop thinking about how to edit code and start thinking about what to edit. And in a world where your main job is steering an AI that’s spitting out code faster than you can read it, that fluidity is everything.


The Learning Curve Is Brutal

But let’s be real. Getting to that level of fluidity sucks.

The vim learning curve is famous for a reason. The first week, you feel like you’ve forgotten how to use a computer. You can’t even exit the editor without Googling it. You hit i when you meant to hit a and end up in the wrong mode. You try to use the mouse and remember, oh right, that’s the whole point, no mouse.

The second week, you start getting the basics. You can move around. You can delete a line. You feel pretty good about yourself.

Then you see someone use ci( to change everything inside parentheses and you realize you’ve learned approximately 2% of what’s possible. And there’s no clear path from here to there. Just an endless sea of keybindings, plugins, and Stack Overflow posts from 2011.

I bounced off this wall so many times. I’d make progress, get frustrated, go back to my old habits. Then six months later I’d try again.

What I needed wasn’t more motivation. It was structure. Clear progression. Immediate feedback. Something that made practicing vim feel less like studying for a test and more like, I don’t know, playing a game.


So I Built a Game

One night, after rage-quitting vim for the sixth time, I had a stupid idea.

What if learning vim keybindings was a tower defense game?

Not a tutorial disguised as a game. Not a typing trainer with a coat of paint. An actual tower defense game where the core mechanic is completing vim editing challenges.

You fight bugs (literal bugs, crawling across the screen). To defend yourself, you place towers. Towers cost gold. You earn gold by completing vim challenges. The faster you complete them, the more gold you get. Miss too many bugs, you lose.

Suddenly, learning ci" isn’t an abstract exercise. It’s the difference between affording an LSP tower or watching a swarm of Daemons destroy your base.

I called it KeyForge. Because you’re forging your skills. And also because tower defense games need cool names.


How It Actually Works

KeyForge is a Neovim plugin. You install it, launch it with a keybind, and a terminal UI pops up with your game running.

You start in campaign mode. Ten levels, each with a different map layout and escalating difficulty. Waves of enemies spawn. Mites at first. Then Bugs. Then Gremlins, Crawlers, Specters, Daemons, and eventually Bosses that take a beating.

You place towers to fight them off. Arrow towers for basic damage. LSP towers for advanced targeting. Refactor towers that deal massive AOE damage.

But here’s the thing. Killing enemies gives you some gold, but not much. The real money comes from challenges.

Hit a keybind and a vim editing challenge pops up in a buffer. „Delete the word under the cursor.“ „Change everything inside the brackets.“ „Jump to the next occurrence of this variable.“ You complete the challenge, submit it, and if you did it right, you get gold. Do it fast and you get a speed multiplier. Up to 2x.

There are over 150 challenges across 15 categories. Movement. Text objects. LSP navigation. Search and replace. Refactoring. Git operations. Window management. Buffer management. Folding. Quickfix lists. Telescope. Surround. Harpoon. Formatting.

The game detects what plugins you have installed and adapts. If you’ve got Telescope, you get fuzzy-finding challenges. If you’re using nvim-surround, you get text manipulation katas. The hints even show your actual keybindings, not the defaults.

There’s also a challenge mode if you just want to grind practice without the tower defense pressure. It’s endless. It tracks your streak. It’s basically vim kata with a scoreboard.

And there’s a tutorial for people who are starting from zero.


Why This Actually Works

I’ve been using KeyForge for a few days now and I’ve learned more vim keybindings than in the previous five years combined.

Part of it is the motivation. When a wave of Specters is about to overrun your base and you need 200 more gold for a tower, you get really good at di{ really fast.

Part of it is the structure. The challenges are organized by category and difficulty. You’re not wandering through a jungle of random keybindings. You’re progressing through a skill tree.

But the biggest part is the immediate feedback. You complete a challenge, you get gold, you place a tower, you see it blast a bug. The loop is tight. You’re not studying for some theoretical future payoff. You’re using the skills right now.

And because it’s all happening inside Neovim, you’re learning in the actual environment where you’ll use these skills. Not in a browser. Not in a separate app. In your editor. With your plugins. With your keybindings.

It turns out, gamification isn’t just a buzzword. It actually works. When the incentive structure is right, practicing hard things becomes fun.


The Real Reason This Matters

Look, I’m not here to tell you that vim keybindings are the only way to be a good developer. You can be incredibly productive with a mouse and some well-placed keyboard shortcuts.

But the game has changed.

AI agents are writing our code now. And they’re only getting better. The skill that matters isn’t typing speed or memorizing syntax. It’s reading comprehension. It’s pattern recognition. It’s the ability to scan a 300-line file, spot the bug, and fix it in three keystrokes.

Vim keybindings give you that speed. But only if you actually learn them. And most people don’t, because the learning process is miserable.

KeyForge fixes that. It makes learning vim something you want to do, not something you force yourself to do. And in a world where navigating code is becoming the core skill of software engineering, that’s not a nice-to-have. That’s essential.


Conclusion

I spent years bouncing off vim. I wanted the speed, but I couldn’t get past the learning curve. Every tutorial felt like homework. Every practice session felt like a grind.

Building KeyForge changed that. Not because it made vim easier (it didn’t), but because it made practicing vim actually fun. When you’re defending your base from a swarm of bugs and you need to nail that ci( to afford your next tower, you learn fast.

The core idea is simple. We’re not typing code anymore. We’re reading it, navigating it, and steering AI that generates it. Vim keybindings are the fastest way to do that. And KeyForge is the fastest way to actually learn them.

If you’ve been putting off learning vim, give it a shot. It’s free. It’s open source. And worst case, you get to play a weird tower defense game inside your text editor.

Best case, you finally break through that wall you’ve been hitting for years. And six months from now, you’re flying through code like you always wanted to.

Install it here: github.com/PatrickKoss/keyforge.nvim

Fight bugs with keystrokes. You might actually enjoy it.

DSGVO Cookie Consent mit Real Cookie Banner