2014-08-15

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.

2013-11-23

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.

2013-11-21

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.

2013-11-19

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.

2013-11-15

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.

2013-11-14

Line Zipper

Line Zipper is a quality challenge. One of my favorites. This is the sort of zipper we have in mind. If the input was six lines, like a/b/c/A/B/C, the output would be A/a/B/b/C/c.