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

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

153 active golfers, 403 entries

Solutions by @mindgitrwx:
21
#14 - mindgitrwx / @mindgitrwx

03/14/2021 at 04:37PM

21
#>14 - mindgitrwx / @mindgitrwx

03/14/2021 at 04:38PM

29
#>102 - mindgitrwx / @mindgitrwx

03/14/2021 at 04:20PM

30
#>105 - mindgitrwx / @mindgitrwx

03/14/2021 at 04:12PM

32
#>117 - mindgitrwx / @mindgitrwx

03/14/2021 at 04:08PM

34
#>138 - mindgitrwx / @mindgitrwx

03/14/2021 at 04:06PM

44
#>147 - mindgitrwx / @mindgitrwx

03/14/2021 at 02:50PM

48
#>149 - mindgitrwx / @mindgitrwx

03/14/2021 at 02:48PM

51
#>150 - mindgitrwx / @mindgitrwx

03/14/2021 at 02:47PM

55
#>151 - mindgitrwx / @mindgitrwx

03/14/2021 at 02:42PM

68
#>152 - mindgitrwx / @mindgitrwx

03/14/2021 at 02:41PM