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):
24
#31 - Prody / @Prody225

12/31/2010 at 05:22PM

24
#32 - Eike Schulte / @eikeschulte

12/31/2010 at 05:32PM

24
#33 - Peter Anselmo / @peter_anselmo

12/31/2010 at 07:28PM

24
#34 - Henri Bourcereau / @mmai

12/31/2010 at 09:07PM

24
#35 - Alain Gilbert / @alain_gilbert

12/31/2010 at 09:16PM

24
#36 - Ricardo Mendes / @locks

12/31/2010 at 10:19PM

24
#37 - Israel Chauca F. / @Raimondi

01/01/2011 at 07:57AM

24
#38 - Leeward Bound / @leewardbound

01/02/2011 at 01:01AM

24
#39 - Brad / @bjjwillis

01/02/2011 at 01:31AM

24
#40 - Adam Pohorecki / @apohorecki

01/03/2011 at 12:34PM

24
#41 - Kyle Willmon / @kylewillmon

01/03/2011 at 05:01PM

24
#42 - Pete Johns / @johnsyweb

01/12/2011 at 11:35AM

24
#43 - Eivind Jahren / @HaskellElephant

01/17/2011 at 05:44PM

24
#44 - h_east (トロッコ6個) / @h_east

01/30/2011 at 07:23AM

24
#45 - Joost / @vlabakje

02/12/2011 at 06:20PM

24
#46 - vg / @vimgolfer

02/27/2011 at 09:24PM

24
#47 - Pavlo Klets / @p01nt

03/19/2011 at 09:10AM

24
#48 - Terje Larsen / @terlars

04/07/2011 at 09:56PM

24
#49 - Hu Junfeng / @junfeng

07/22/2011 at 02:36PM

24
#50 - nicolas bo / @thevegeta

11/09/2011 at 03:29PM

24
#51 - Pei-Lun Lee / @ypcatw

01/09/2012 at 06:02AM

24
#52 - Kerson Hsiao / @KersonHsiao

07/18/2012 at 01:52AM

24
#53 - Marco Hinz / @_mhinz_

05/21/2013 at 11:27PM

24
#54 - Woojung Kim 김우중 / @_kimwz

07/17/2013 at 10:17AM

24
#55 - Domingue Justin / @_jdomingue

01/08/2014 at 04:57PM

24
#56 - Ram Tamtam / @ramtamtamtam

07/02/2014 at 01:49PM

24
#57 - Walker Boh / @walker_boh

12/14/2015 at 09:18AM

24
#58 - Matti Sairanen / @MattiSairanen

08/03/2017 at 12:22PM

25
#59 - Josh Weinberg / @jcweinberg

12/31/2010 at 06:23PM

25
#60 - Behnam Esfahbod / @zwnj

12/31/2010 at 06:53PM