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):
33
#121 - aaaa3331 / @aaaa3331

01/03/2011 at 09:48PM

33
#122 - David Duponchel / @dduponchel

01/08/2011 at 07:07PM

33
#123 - Stephan Weller / @stephan_weller

01/10/2011 at 09:16PM

33
#124 - drio / @drio

01/11/2011 at 01:32PM

33
#125 - Andrey A. Ugolnik / @andreyugolnik

01/19/2011 at 07:46PM

33
#126 - William Dunand / @wdunand

11/28/2011 at 08:34AM

33
#127 - You-Siang Lin / @yslinnctu

12/02/2011 at 11:39AM

33
#128 - Al / @96258

12/14/2011 at 04:31PM

33
#129 - Xavier Nayrac / @lkdjiin

12/30/2011 at 03:46PM

33
#130 - akira_simpson / @akira_simpson

01/31/2012 at 06:18PM

33
#131 - Dan Huang / @yuzeh

02/16/2012 at 12:10AM

33
#132 - Melvin Cheung / @MelvinCheung

05/24/2017 at 03:50PM

34
#133 - Tom Duijf / @tomduijf

02/12/2011 at 06:02PM

34
#134 - Raul Brito / @raulbrito

06/16/2011 at 09:30AM

35
#135 -  Ikhsan Maulana / @ixandidu

12/31/2010 at 04:46PM

35
#136 - yamasita taisuke / @yaasita

07/12/2014 at 05:07AM

36
#137 - Joe Hassick / @jhassick

12/31/2010 at 06:22PM

36
#138 - Nicolas Friedli / @NicolasFriedli

10/28/2012 at 07:11PM

37
#139 - woodspock / @woodspock

12/31/2010 at 06:48PM

39
#140 - Joel Taylor / @joelteon_

12/31/2010 at 11:42PM

39
#141 - Antoine Hérault / @Herzult

01/03/2011 at 10:14PM

40
#142 - solsTiCe d'Hiver / @solstice_dhiver

01/01/2011 at 09:11PM

43
#143 - Toto l'haricot / @nico_le_terribl

01/09/2011 at 06:58PM

45
#144 - David E Smith / @david3smith

12/31/2010 at 07:28PM

46
#145 - Joshua Flanagan / @jflanagan

01/01/2011 at 12:01AM

50
#146 - libicocco / @libicocco

12/31/2010 at 07:08PM

55
#147 - Jan B. / @bracki

01/03/2011 at 04:52PM

57
#148 - Oliver Christ / @0liverChrist

10/16/2013 at 09:36PM

78
#149 - neleai / @enlaei

12/31/2010 at 09:49PM