The new vimgolf client

A new vimgolf client, version 0.4.8, was just released. It has lots of improvements. I added them, and I want to boast about it.


Vimgolf workflow

Playing Vimgolf is different from using Vim normally to edit text. You can spend hours finding an impractical way to save a single stroke on a basic task. Vimgolf is 100% planning and 0% execution. There are no typos. If you're entering your solution and you mess up, you start over and get it right. Finding the perfect solution is difficult and rewarding.

Planning a solution involves a different workflow than regular text editing. If you start the vimgolf client, type the first thing that comes to mind, and call it good, you'll get terrible scores. My workflow honestly isn't that good, but when I talk to other players about theirs, my reaction is usually, "You do WHAT?!". So maybe I have something to share.


Stairs Indenting

The challenge. Every line needs a number of spaces equal to the line number. There are lots of interesting solutions, so I'll show several.


Reverse Simple Deletion

It's hard to say if a VimGolf challenge is "hard" or "easy". Every challenge is easy if you waste enough strokes. In Reverse Simple Deletion, just one stroke separates an easy 12 from an unreasonably difficult 11.


Prime Numbers

Prime Numbers is among the hardest challenges in VimGolf. I've spent more time working on this challenge than any other. When I first saw it, I figured I'd have to brush up on my vimscript. As it turns out, you don't really need any at all.


It's a factor (plus a little Prime Numbers)

Given a list of numbers, this challenge has you replace each number with a list of its factors. It sounds complicated, but it can be done very fast with a (somewhat) simple macro.