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 4d1e037dde2f897c2a000417

Reverse and count

Someone typed things upside down and now a Vim ninja needs to reverse the lines and count how many there are.

Start file
Sixth line
Fifth line
Fourth line
Third line
Second line
First line
End file
1. First line
2. Second line
3. Third line
4. Fourth line
5. Fifth line
6. Sixth line

View Diff

1,6c1,6
< Sixth line
< Fifth line
< Fourth line
< Third line
< Second line
< First line
---
> 1. First line
> 2. Second line
> 3. Third line
> 4. Fourth line
> 5. Fifth line
> 6. Sixth line

Solutions by @jashbeta:

Unlock 12 remaining solutions by signing in and submitting your own entry
Created by: @jamesconroyfinn

176 active golfers, 473 entries

Solutions by @jashbeta:
22
#37 - Jaime A. Sánchez / @jashbeta

12/22/2011 at 04:18AM

23
#>48 - Jaime A. Sánchez / @jashbeta

12/22/2011 at 04:16AM

24
#>70 - Jaime A. Sánchez / @jashbeta

12/22/2011 at 04:08AM

25
#>84 - Jaime A. Sánchez / @jashbeta

12/22/2011 at 04:07AM

26
#>100 - Jaime A. Sánchez / @jashbeta

12/22/2011 at 04:03AM

27
#>105 - Jaime A. Sánchez / @jashbeta

12/22/2011 at 04:02AM

28
#>107 - Jaime A. Sánchez / @jashbeta

12/22/2011 at 03:55AM

28
#>107 - Jaime A. Sánchez / @jashbeta

12/22/2011 at 03:58AM

33
#>147 - Jaime A. Sánchez / @jashbeta

12/22/2011 at 03:31AM

33
#>147 - Jaime A. Sánchez / @jashbeta

12/22/2011 at 03:35AM

33
#>147 - Jaime A. Sánchez / @jashbeta

12/22/2011 at 03:36AM

40
#>165 - Jaime A. Sánchez / @jashbeta

12/22/2011 at 03:30AM