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 5486c522908f4600023c53fa

Test everything!

... and build the desired input data structure. Transform a list of values into a non-trivial format.

Start file
        { changed_field => 'lorem', old_value => 'a', new_value => 'b' },
lorem ipsum dolor sit amet elitr sed diam non umy eir mod tempor invi dunt lab ore
dol1 dol2 dol3 dol4 dol5 dol6 dol7 dol8 dol9 dol10 mag1 mag2 mag3 mag4 mag5 mag6 mag7 mag8 mag9 mag10
End file
        { changed_field => 'lorem', old_value => 'a', new_value => 'b' },
        { changed_field => 'ipsum', old_value => 'a', new_value => 'b' },
        { changed_field => 'dolor', old_value => 'a', new_value => 'b' },
        { changed_field => 'sit', old_value => 'a', new_value => 'b' },
        { changed_field => 'amet', old_value => 'a', new_value => 'b' },
        { changed_field => 'elitr', old_value => 'a', new_value => 'b' },
        { changed_field => 'sed', old_value => 'a', new_value => 'b' },
        { changed_field => 'diam', old_value => 'a', new_value => 'b' },
        { changed_field => 'non', old_value => 'a', new_value => 'b' },
        { changed_field => 'umy', old_value => 'a', new_value => 'b' },
        { changed_field => 'eir', old_value => 'a', new_value => 'b' },
        { changed_field => 'mod', old_value => 'a', new_value => 'b' },
        { changed_field => 'tempor', old_value => 'a', new_value => 'b' },
        { changed_field => 'invi', old_value => 'a', new_value => 'b' },
        { changed_field => 'dunt', old_value => 'a', new_value => 'b' },
        { changed_field => 'lab', old_value => 'a', new_value => 'b' },
        { changed_field => 'ore', old_value => 'a', new_value => 'b' },
        { changed_field => 'dol1', old_value => 'a', new_value => 'b' },
        { changed_field => 'dol2', old_value => 'a', new_value => 'b' },
        { changed_field => 'dol3', old_value => 'a', new_value => 'b' },
        { changed_field => 'dol4', old_value => 'a', new_value => 'b' },
        { changed_field => 'dol5', old_value => 'a', new_value => 'b' },
        { changed_field => 'dol6', old_value => 'a', new_value => 'b' },
        { changed_field => 'dol7', old_value => 'a', new_value => 'b' },
        { changed_field => 'dol8', old_value => 'a', new_value => 'b' },
        { changed_field => 'dol9', old_value => 'a', new_value => 'b' },
        { changed_field => 'dol10', old_value => 'a', new_value => 'b' },
        { changed_field => 'mag1', old_value => 'a', new_value => 'b' },
        { changed_field => 'mag2', old_value => 'a', new_value => 'b' },
        { changed_field => 'mag3', old_value => 'a', new_value => 'b' },
        { changed_field => 'mag4', old_value => 'a', new_value => 'b' },
        { changed_field => 'mag5', old_value => 'a', new_value => 'b' },
        { changed_field => 'mag6', old_value => 'a', new_value => 'b' },
        { changed_field => 'mag7', old_value => 'a', new_value => 'b' },
        { changed_field => 'mag8', old_value => 'a', new_value => 'b' },
        { changed_field => 'mag9', old_value => 'a', new_value => 'b' },
        { changed_field => 'mag10', old_value => 'a', new_value => 'b' },

View Diff

2,3c2,37
< lorem ipsum dolor sit amet elitr sed diam non umy eir mod tempor invi dunt lab ore
< dol1 dol2 dol3 dol4 dol5 dol6 dol7 dol8 dol9 dol10 mag1 mag2 mag3 mag4 mag5 mag6 mag7 mag8 mag9 mag10
---
>         { changed_field => 'ipsum', old_value => 'a', new_value => 'b' },
>         { changed_field => 'dolor', old_value => 'a', new_value => 'b' },
>         { changed_field => 'sit', old_value => 'a', new_value => 'b' },
>         { changed_field => 'amet', old_value => 'a', new_value => 'b' },
>         { changed_field => 'elitr', old_value => 'a', new_value => 'b' },
>         { changed_field => 'sed', old_value => 'a', new_value => 'b' },
>         { changed_field => 'diam', old_value => 'a', new_value => 'b' },
>         { changed_field => 'non', old_value => 'a', new_value => 'b' },
>         { changed_field => 'umy', old_value => 'a', new_value => 'b' },
>         { changed_field => 'eir', old_value => 'a', new_value => 'b' },
>         { changed_field => 'mod', old_value => 'a', new_value => 'b' },
>         { changed_field => 'tempor', old_value => 'a', new_value => 'b' },
>         { changed_field => 'invi', old_value => 'a', new_value => 'b' },
>         { changed_field => 'dunt', old_value => 'a', new_value => 'b' },
>         { changed_field => 'lab', old_value => 'a', new_value => 'b' },
>         { changed_field => 'ore', old_value => 'a', new_value => 'b' },
>         { changed_field => 'dol1', old_value => 'a', new_value => 'b' },
>         { changed_field => 'dol2', old_value => 'a', new_value => 'b' },
>         { changed_field => 'dol3', old_value => 'a', new_value => 'b' },
>         { changed_field => 'dol4', old_value => 'a', new_value => 'b' },
>         { changed_field => 'dol5', old_value => 'a', new_value => 'b' },
>         { changed_field => 'dol6', old_value => 'a', new_value => 'b' },
>         { changed_field => 'dol7', old_value => 'a', new_value => 'b' },
>         { changed_field => 'dol8', old_value => 'a', new_value => 'b' },
>         { changed_field => 'dol9', old_value => 'a', new_value => 'b' },
>         { changed_field => 'dol10', old_value => 'a', new_value => 'b' },
>         { changed_field => 'mag1', old_value => 'a', new_value => 'b' },
>         { changed_field => 'mag2', old_value => 'a', new_value => 'b' },
>         { changed_field => 'mag3', old_value => 'a', new_value => 'b' },
>         { changed_field => 'mag4', old_value => 'a', new_value => 'b' },
>         { changed_field => 'mag5', old_value => 'a', new_value => 'b' },
>         { changed_field => 'mag6', old_value => 'a', new_value => 'b' },
>         { changed_field => 'mag7', old_value => 'a', new_value => 'b' },
>         { changed_field => 'mag8', old_value => 'a', new_value => 'b' },
>         { changed_field => 'mag9', old_value => 'a', new_value => 'b' },
>         { changed_field => 'mag10', old_value => 'a', new_value => 'b' },

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 32 remaining solutions by signing in and submitting your own entry
#33 Lieven Keersmaekers / LievenKeersmaek - Score: 40 - 12/09/14 @ 19:58
0"ad$dd:%s/ /\r/g<CR>qq0d$"apFrviwpkq<k3><k6>@qZZ

0 comments

#34 Andrii Maksai / AMaksai - Score: 40 - 10/12/16 @ 20:52
j^dwJ^qqdwk:1co.<CR>fmvi'pxj^q35@qddf1a0<Esc>ZZ

0 comments

#35 Marcin Radomski / _dextero - Score: 42 - 12/09/14 @ 10:17
0"adf'de"sDdd:%s/ /\r/g<CR>qq0"aP$"spkq36@qZZ

0 comments

#36 Tom Reznick / threznick - Score: 42 - 12/10/14 @ 22:17
0"adf'de"sDdd:%s/ /\r/g<CR>qq0"aP$"spkq36@qZZ

0 comments

#37 Frederik Vosberg / FrediVosberg - Score: 44 - 12/10/14 @ 07:59
jVj:s/ /\r/g<CR>ggfl;cw&<Esc>ddqqq:%s/.*/<C-R>"<CR>u:<Up><BS><CR>ZZ

0 comments

#38 Oliver Christ / 0liverChrist - Score: 46 - 01/12/15 @ 00:11
<Home>vf'"ay;;v<End>"by+dwqq"aPe"bp+hxq15@qdd2.20@qddZZ

0 comments

#39 Alexandre Ignjatovic / bankair - Score: 50 - 12/09/14 @ 11:37
0"ad$ddJ:s//<BS> /\r/g<CR>qq"aP<Right>dw0t'<Right><Right>P<Right>dw<Up>0<Esc>q365@q:wq<CR>

0 comments

#40 RetirePlanner / RetirePlanner24 - Score: 83 - 12/09/14 @ 15:17
^^f'v^hhhhhhhhhhhhy:2,3s/ /\r/g<CR>:s<BS>2,$s/^/<C-R>"/<CR>ggf';v$y:2,$s/$/<C-R>"<BS>/<CR>ggdd:w<CR>:wq<BS>q<BS><BS>q<CR>

0 comments

Created by: Someone_Busy

40 active golfers, 95 entries

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

12/09/2014 at 11:05AM

22
#2 - John Braxler / braxler

12/09/2014 at 06:46PM

22
#3 - Petro Тrouq / zulolosi

12/11/2014 at 08:14PM

22
#4 - jared swarts / JaredSwarts

12/12/2014 at 10:49PM

23
#5 - Jon Krause / jkrause314

01/17/2016 at 11:55PM

23
#6 - Alonzo / tolver_a

02/02/2017 at 01:07AM

24
#7 - Kai Yuan / kentyuan

12/09/2014 at 11:18AM

25
#8 - Matthieu Crapet / mcr05

12/10/2014 at 08:35PM

25
#9 - kobby / _kafdot_

12/10/2014 at 10:23PM

25
#10 - Carlos A Henríquez Q / lagunex

01/17/2015 at 06:26PM

25
#11 - Charles A. Bouffard / the_cabouffard

04/05/2015 at 08:22PM

25
#12 - pftb12345 / pftb12345

04/11/2015 at 01:06AM

26
#13 - Matt Robbins / mcrmfc

12/11/2014 at 06:05PM

26
#14 - Mauro Persano / fzort

06/05/2015 at 11:49PM

27
#15 - Carlos López / morrizon

01/04/2015 at 05:55PM

29
#16 - Pierre Houssin / PierreHoussin

12/11/2014 at 12:28AM

31
#17 - Ricardo M. Vilchis / ajkaanbal

12/09/2014 at 03:58PM

32
#18 - Simon Tost / Someone_Busy

12/09/2014 at 10:38AM

32
#19 - YNWP / ynw_P

12/09/2014 at 10:11PM

32
#20 - Daniel Rødskog / daniero

12/10/2014 at 09:02PM

32
#21 - xieyh11 / xieyh11

02/28/2015 at 10:01AM

33
#22 - Paul Salcido / PaulCodeMonkey

12/10/2014 at 05:34PM

33
#23 - James / Dronak

12/12/2014 at 03:17AM

33
#24 - Ed / posva

12/18/2014 at 10:31AM

33
#25 - r. / rmarvie

12/19/2014 at 08:51AM

34
#26 - mnx / mnxx

12/09/2014 at 10:39AM

34
#27 - Thameera‏ Senanayaka / thameera

12/10/2014 at 02:28PM

34
#28 - .さとうにるぽ引退.swp / nillpo

12/25/2014 at 12:07PM

34
#29 - Jake Eskel / JakeEskel

01/02/2015 at 06:00PM

36
#30 - Josu Oyanguren / josuoyanguren

12/09/2014 at 11:41AM

37
#31 - ltn614 / ltn614

09/25/2015 at 03:38AM

39
#32 - Elizabeth / sprinkles418

12/13/2014 at 05:34AM

40
#33 - Lieven Keersmaekers / LievenKeersmaek

12/09/2014 at 07:58PM

40
#34 - Andrii Maksai / AMaksai

10/12/2016 at 08:52PM

42
#35 - Marcin Radomski / _dextero

12/09/2014 at 10:17AM

42
#36 - Tom Reznick / threznick

12/10/2014 at 10:17PM

44
#37 - Frederik Vosberg / FrediVosberg

12/10/2014 at 07:59AM

46
#38 - Oliver Christ / 0liverChrist

01/12/2015 at 12:11AM

50
#39 - Alexandre Ignjatovic / bankair

12/09/2014 at 11:37AM

83
#40 - RetirePlanner / RetirePlanner24

12/09/2014 at 03:17PM