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

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 161 remaining solutions by signing in and submitting your own entry
#162 neleai / @enlaei - Score: 78 - 12/31/10 @ 21:49
dd<Down><Down><Down><Down>p<Up>dd<Up><Up><Up><Up>pdd<Home><Up>p<Up>dd<Down><Down><Down>p<Up>dd<Up><Up><Up>p<Down>ddp<Up><Up><Up><Up>i1. <Down><Home>2. <Down><Home>3. <Down><Home>4. <Down><Home>5.,<BS> <Down><Home>6. <Esc>:wq<CR>

0 comments


Created by: @jamesconroyfinn

162 active golfers, 422 entries

Leaderboard (lowest score wins):
18
#1 - Urtica dioica / @udioica

06/25/2015 at 07:17PM

18
#2 - Jon Krause / @jkrause314

01/20/2016 at 10:29PM

18
#3 - Peter Brynza / @v3_1

08/28/2016 at 08:07PM

18
#4 - Turkey Man / @lvturkeyman

11/28/2017 at 06:20PM

18
#5 - DHM / @DHM29978992

05/27/2018 at 01:48AM

18
#6 - John Braxler / @braxler

08/14/2018 at 03:29PM

18
#7 - Lory / @Lory46845742

12/27/2019 at 12:55PM

18
#8 - Kha Nguyen / @__ngtrongkha

01/22/2021 at 06:10AM

18
#9 - blabla zincou / @BZincou

03/24/2022 at 09:02PM

18
#10 - Jean George / @JeanGeo20504212

05/23/2022 at 03:46PM

18
#11 - russellzhaomao / @russellzhaomao

05/31/2022 at 02:29AM

18
#12 - Alex / @AlexanderHeatl2

07/01/2022 at 05:40PM

18
#13 - Qing Liu / @poeminlash

07/30/2022 at 03:31AM

18
#14 - Janzen / @__Coos

09/23/2022 at 09:23AM

18
#15 - 刘宏亮 / @AkeyCoy

09/25/2022 at 02:35AM

19
#16 - roudens / @roudens2

02/20/2021 at 04:12AM

19
#17 - treb / @treb03683130

03/13/2021 at 12:58PM

21
#18 - Gurukandhamoorthi / @Gurukandhamoor1

08/13/2017 at 04:05PM

21
#19 - Mihai / @mihaicristiant

03/25/2019 at 03:33PM

21
#20 - Brendan Schaenzer / @bschaenzer

09/30/2020 at 09:08PM

21
#21 - mindgitrwx / @mindgitrwx

03/14/2021 at 04:37PM

21
#22 - James / @Dronak

11/07/2022 at 06:50PM

22
#23 - Aurélien Delahaye / @alkove

01/02/2011 at 09:29PM

22
#24 - Benoît Ryder / @benoitryder

01/03/2011 at 10:48PM

22
#25 - Danny O'Sullivan / @db0s

01/05/2011 at 11:01AM

22
#26 - Balkoth / @_Balkoth_

01/08/2011 at 11:04PM

22
#27 - Tim Chase / @gumnos

06/11/2011 at 12:27AM

22
#28 - not so punk :] / @notsopunk

06/19/2011 at 05:21PM

22
#29 - Justin Love / @wondible

07/19/2011 at 02:42PM

22
#30 - p0ckets / @p0ckets

10/09/2011 at 07:58PM