Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 54e2169fb89efb2ab10012e6

Sorting database text output

Sometimes it is nice to be able to quickly take column-formatted text output from the SQL command line and turn it into a list of useful data. In this case we want a unique, sorted list of the values from the second column combined into one comma-separated list. What is the fewest strokes you can do this in?

Start file
      0 |    1
      0 |   24
      1 |    1
      1 |    2
      1 |    3
      1 |    4
      1 |   15
      1 |   24
      1 |   62
      1 |  107
      2 |    1
      2 |    2
      2 |    8
      2 |   15
      2 |   18
      2 |   25
      2 |   28
      2 |   47
      2 |   65
      2 |   69
      2 |   76
      2 |   99
      2 |  103
      2 |  110
      2 |  153
      3 |    3
      3 |   32
      3 |   49
      3 |   65
      3 |   76
      3 |   96
      4 |    2
End file
1, 2, 3, 4, 8, 15, 18, 24, 25, 28, 32, 47, 49, 62, 65, 69, 76, 96, 99, 103, 107, 110, 153

View Diff

1,32c1
<       0 |    1
<       0 |   24
<       1 |    1
<       1 |    2
<       1 |    3
<       1 |    4
<       1 |   15
<       1 |   24
<       1 |   62
<       1 |  107
<       2 |    1
<       2 |    2
<       2 |    8
<       2 |   15
<       2 |   18
<       2 |   25
<       2 |   28
<       2 |   47
<       2 |   65
<       2 |   69
<       2 |   76
<       2 |   99
<       2 |  103
<       2 |  110
<       2 |  153
<       3 |    3
<       3 |   32
<       3 |   49
<       3 |   65
<       3 |   76
<       3 |   96
<       4 |    2
---
> 1, 2, 3, 4, 8, 15, 18, 24, 25, 28, 32, 47, 49, 62, 65, 69, 76, 96, 99, 103, 107, 110, 153

Solutions by @jkrause314:

Unlock 1 remaining solutions by signing in and submitting your own entry
Created by: @kirk_bauer

80 active golfers, 213 entries

Solutions by @jkrause314:
24
#33 - Jon Krause / @jkrause314

01/10/2016 at 04:59AM