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 148 remaining solutions by signing in and submitting your own entry
#149 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

149 active golfers, 384 entries

Leaderboard (lowest score wins):
29
#91 - Antonio Lucca / @tonyxzt

12/31/2010 at 06:42PM

29
#92 - Dmytro Shteflyuk / @kpumuk

12/31/2010 at 09:52PM

29
#93 - Ben Lenarts / @benlenarts

01/03/2011 at 12:09AM

29
#94 - PJ Probity / @james_cartledge

01/03/2011 at 09:42AM

29
#95 - Kurt Gaastra / @KGaastra

02/14/2012 at 06:03AM

29
#96 - Tyler Breisacher / @tbreisacher

08/25/2012 at 09:09AM

29
#97 - CJ Avilla / @wizemanip

11/06/2014 at 06:03AM

29
#98 - Raj / @brshenoy

06/01/2015 at 05:07PM

30
#99 - Francisco Dibar / @frandibar

01/07/2011 at 02:28AM

30
#100 - Sid Momin / @mominsid

11/04/2015 at 09:58PM

30
#101 - Kyouma / @kyoumaJohn

10/15/2016 at 09:51PM

31
#102 - Mohammad-Javad Izadi / @mjizadi

01/05/2011 at 01:38PM

31
#103 - Frederik Mogensen / @fmogensen

03/31/2011 at 10:17AM

32
#104 - Bill Odom / @billodom

12/31/2010 at 11:04PM

32
#105 - Ujjwol Lamichhane / @Ujjwol

01/01/2011 at 02:48AM

32
#106 - David / @ddddddddavid

01/02/2011 at 03:47AM

32
#107 - Øystein Walle / @oysteinwalle

07/10/2011 at 11:11AM

32
#108 - Dave / @zzdave13

07/13/2011 at 09:40PM

32
#109 - jasper110 / @jasper110

09/22/2011 at 09:13AM

32
#110 - Son of Bongo / @bpcode

05/13/2012 at 11:46AM

32
#111 - Michael Limiero / @michaellimiero

08/15/2012 at 04:47PM

32
#112 - Tom User / @kiryph

05/30/2013 at 11:52AM

32
#113 - cj / @cj01101

02/03/2014 at 11:31PM

33
#114 - kmymtksh / @kmymtksh

12/31/2010 at 06:37PM

33
#115 - Ryan Horn / @ryan_horn

12/31/2010 at 07:10PM

33
#116 - xer0x / @xer0x

01/01/2011 at 08:41PM

33
#117 - Addisu Taddese / @azeey

01/02/2011 at 02:50AM

33
#118 - Marc Lacoursière / @RooSoft

01/02/2011 at 02:56AM

33
#119 - davidnorth / @davidnorth

01/02/2011 at 03:07AM

33
#120 - Jens-Chr. Fischer / @jcfischer

01/03/2011 at 10:40AM