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 @YannMoisan:

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

83 active golfers, 223 entries

Solutions by @YannMoisan:
24
#15 - Yann Moisan / @YannMoisan

02/21/2015 at 08:43AM

25
#>44 - Yann Moisan / @YannMoisan

02/21/2015 at 08:38AM

27
#>67 - Yann Moisan / @YannMoisan

02/21/2015 at 07:45AM

27
#>67 - Yann Moisan / @YannMoisan

02/21/2015 at 08:38AM

29
#>73 - Yann Moisan / @YannMoisan

02/21/2015 at 07:35AM

40
#>83 - Yann Moisan / @YannMoisan

02/21/2015 at 07:34AM