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 51d6ddf4b0c5d6000200002e

Pairs of numbers

Line 1 represents x, line 2 y-data. Bring the corresponding pairs in the form "[x,y]\n"

Start file
0.173 0.499 0.764 0.938 1.000 0.927 0.527 0.000 -0.173 -0.499 -0.764 -0.938 -1.000 -0.927 -0.527 0.000
0.985 0.867 0.645 0.346 0.005 -0.376 -0.850 1.000 0.985 0.867 0.645 0.346 0.005 -0.376 -0.850 1.000

End file
[0.173, 0.985]
[0.499, 0.867]
[0.764, 0.645]
[0.938, 0.346]
[1.000, 0.005]
[0.927, -0.376]
[0.527, -0.850]
[0.000, 1.000]
[-0.173, 0.985]
[-0.499, 0.867]
[-0.764, 0.645]
[-0.938, 0.346]
[-1.000, 0.005]
[-0.927, -0.376]
[-0.527, -0.850]
[0.000, 1.000]

View Diff

1,2c1,16
< 0.173 0.499 0.764 0.938 1.000 0.927 0.527 0.000 -0.173 -0.499 -0.764 -0.938 -1.000 -0.927 -0.527 0.000
< 0.985 0.867 0.645 0.346 0.005 -0.376 -0.850 1.000 0.985 0.867 0.645 0.346 0.005 -0.376 -0.850 1.000
---
> [0.173, 0.985]
> [0.499, 0.867]
> [0.764, 0.645]
> [0.938, 0.346]
> [1.000, 0.005]
> [0.927, -0.376]
> [0.527, -0.850]
> [0.000, 1.000]
> [-0.173, 0.985]
> [-0.499, 0.867]
> [-0.764, 0.645]
> [-0.938, 0.346]
> [-1.000, 0.005]
> [-0.927, -0.376]
> [-0.527, -0.850]
> [0.000, 1.000]

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 96 remaining solutions by signing in and submitting your own entry
#97 galadriel2143 / galadriel2143 - Score: 47 - 07/06/13 @ 09:08
qq"xdWj"ydWGO[<C-R>x<BS>, <C-R>y<BS>]<Esc><C-O>kq14@q@@djGkf,i0<Esc>f].ZZ

0 comments

#98 Tullio Facchinetti / toolleeo - Score: 49 - 07/25/13 @ 14:07
qq"adWj"AdWG"apr]0i[<C-O>f ,<End><CR><Esc>1Gq14@q2ddGPJi,<Home>[<End>]<Esc>ZZ

0 comments

#99 Jonas K. / geratheon - Score: 49 - 02/28/14 @ 16:55
A <Down> <Esc>Hqqdf GpHjdf GA<Esc>pI[<Esc>f i,<Esc>A<BS>]<CR><Esc>Hq15@qHgg2ddZZ

0 comments

#100 ZorgroZ / ZorgroZ - Score: 49 - 04/11/14 @ 21:16
j:%s/ /<C-V><CR>/g<CR>''qqd$gg/[^]]$<CR>I[<C-O>A, <C-R>"]<Esc>/^$<CR>Jq15@qZZ

0 comments

#101 Kudryavtsev Alexandr / kudryav_a - Score: 51 - 08/08/13 @ 06:42
j:1,2s/ /\r/g<NL>''qqd$gg/[^]]$<CR>I[<C-O>A, <C-R>"]<Esc>/^$<CR>Jq15@qZZ

0 comments

#102 James / Dronak - Score: 51 - 09/17/13 @ 02:32
qqdWGp2GdWG$pI[<Esc>t a,<Esc>A<BS>]<CR><Esc>ggq15@qf1i, <Esc>A]<CR><Up><Esc>gg2ddZZ

0 comments

#103 Jonathan Potter / nTypeRed - Score: 51 - 11/12/13 @ 16:31
qqdWGp2GdWG$pI[<Esc>t a,<Esc>A<BS>]<CR><Esc>ggq15@qf1i, <Esc>A]<CR><Up><Esc>gg2ddZZ

0 comments

#104 Volodymyr / vkrest - Score: 53 - 07/07/13 @ 22:57
:s/\(\S*\) */[\1, \r/g<CR>ddjddggqqGdW''$pr]jq15@qki0<Esc>ZZ

0 comments

#105 Carlos A Henríquez Q / lagunex - Score: 53 - 01/19/15 @ 12:36
"xDdd"yDqqi[<C-R>x<Esc>F[W"xDi, <C-R>y<Esc>F,2W"yDi]<CR><Esc>q15@qbdT00i<BS><Esc>ZZ

0 comments

#106 Daniel Lundin / danielundin - Score: 55 - 07/09/13 @ 13:59
qq"adWj"AdWkO<Esc>"aP0i[<Esc>f s, <Esc>A<C-H>]<Esc>j0q12@q@q@@i[<Esc>Js, <Esc>A]<Esc>ZZ

0 comments

#107 Heath Patterson / HeathPatterson - Score: 55 - 08/10/13 @ 19:53
A <Down> <Esc>:1<CR>qqd/ <CR>Gi[, ]<CR><Esc>?,<CR>P:2<CR>d/ <CR>G?]<CR>P:1<CR>q15@qDDDddddZZ

0 comments

#108 fSchl / FelixSchlitter - Score: 57 - 07/16/13 @ 01:26
qq"adaWj"sdaWGi[<C-R>a, <C-R>s]<CR><Esc>ggq15@q2dd:%s/ ,/,/<CR>:%s/ ]/]/<CR>ZZ

0 comments

#109 Jeffrey Klein / jeffwklein - Score: 57 - 08/20/13 @ 19:09
A <Esc>jA <Esc>0kqqElDLp0xkElDjo<Esc>p0xkki<BS>, <Esc>A]<Esc>I[<Esc>Lo<Esc>kk@qq@qddddZZ

0 comments

#110 tomazy / tomazy - Score: 58 - 07/07/13 @ 15:40
:%s/ /\r/g<CR>ggqq17Gdd<C-O>pkJjq15@q:%s/\v(.*) (.*)/[\1, \2]/<CR>ZZ

0 comments

#111 Justin Knag / justinknag - Score: 60 - 10/10/14 @ 06:04
:%s/ /\r/g<CR>V15k:s/.*/, &]<CR>H$qqma/,<CR>Ddd`a"-pjq15@q:%s/^/[<CR>xZZ

0 comments

#112 Patrick Pitoscia / Patrick03960431 - Score: 61 - 08/09/14 @ 01:42
qqgg"adWj"bdWGo<C-R>a<C-R>b<Esc>q15@qgg3ddqq0[<Esc>i[<Esc>Ea,<Esc>$r]jq15@qF1i, <Esc>o<Esc>ZZ

0 comments

#113 esiegel / esiegel - Score: 62 - 07/06/13 @ 18:32
:%s/ /\r/g<CR>:1,$-1g/^/17m.|.-1j<CR>:%s/\v(.*) (.*)/[\1, \2]/g<CR>:wq<CR>

0 comments

#114 barnabaguy / barnabaguy - Score: 63 - 02/24/14 @ 21:20
:%s/<C-V> /<C-V><CR>/g<CR><C-V>17G$dggA  <Esc>pqqI[<Esc>Ea,<Esc>A]<Esc>jq15@qdGo<Esc>:%s/\v\s+/ /g<CR>ZZ

0 comments

#115 ltn614 / ltn614 - Score: 64 - 09/24/15 @ 02:39
:s/ / [/g<CR>I[<Esc>A <Esc>+:s<Up><Left><Left><BS><BS>] <CR>A] <Esc>-qqdf Gpi,<Esc>2Gdf G$pxo<Esc>ggq15@qdjZZ

0 comments

#116 TrentonZero / TrentonZero - Score: 66 - 07/06/13 @ 01:18
qadf O<Esc>p2j^df 2kf pj^q15@ajI<BS> <Esc>:%s/\(\S*\) \(\S*\).*/[\1, \2]/g<NL>ZZ

TrentonZero: Ugg pathetic.

zulolosi: No, practical exercises ! Well and correct solution !

zulolosi: ... and much better than nothing !

zulolosi: ...and you can do another try to get better score to add the [...] in first step, macro step !

4 comments

#117 codegourmet / codegourmet - Score: 67 - 10/01/13 @ 12:23
qq"adt xj"bdt x<Esc>GA[<Esc>"apA, <Esc>"bpA]<CR><Esc>ggq15@qVjd<Esc>Gpkddi[<Esc>Ji,<Esc>A]<Esc>A<CR><Esc>:wq<CR>

0 comments

#118 Chris Svenningsen / hmmwhatsthis - Score: 68 - 07/11/13 @ 18:46
:%s/ /\r/g<CR>ggqq17Gdd<C-O>pkJjq15@q:%s/\v(.(<BS>)<BS>*) (.()<BS><BS>*)(<BS>/[\1, \2]/<CR>ZZ

0 comments

#119 A.B / _a0b_ - Score: 80 - 07/09/13 @ 01:21
V:s//<BS> / <BS>, \r[/g<CR>A, <Esc>jV:s/ /]\r/g<CR>A]<Esc>0<C-V>15k$xggi[<Esc>$p8j<C-V>7jkI <Esc>$<C-V>6jx<C-V>4jx:17<CR>dGo<Esc>ZZ

0 comments

#120 Adrian / adrian234b - Score: 112 - 08/14/13 @ 09:11
i[<BS><Esc>qqi[<Esc>Ea,<Esc>lv^dOp<BS><Esc>p<Esc>^jjEa]<Esc>lv^dkk$pdw^jq@q@q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q<Esc>jhhhhhhhdw<Esc>udEkA<Esc>p<Esc>uA <Esc>pA]<Esc>jdddd:w<CR>:q<CR>

0 comments

#121 Julien Pepy / shin_komuta - Score: 376 - 08/02/13 @ 13:21
qa:%s/\(-\?[0-9\.]\+\)\ \([^\n]*\)\n\(-\?[0-9\.]\+\)\ /[\1, \3]^M\2^M/<Left><BS><BS><C-K><CR><CR><Left><Left><Left><Left><Right><BS><BS><C-K><CR><CR><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><CR>q3@a12@au@a@a@a@a@a@a@a@a@a@a@a:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><BS><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><BS><CR><Esc>u<Down><Up><Down>:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>^<Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Left><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Left><CR>dddd:x<CR>

0 comments

Created by: powertomato

121 active golfers, 309 entries

Leaderboard (lowest score wins):
26
#1 - Jon Krause / jkrause314

12/31/2015 at 09:40PM

26
#2 - Turkey Man / lvturkeyman

11/26/2017 at 04:56PM

27
#3 - Urtica dioica / udioica

07/05/2013 at 08:35PM

27
#4 - Petro Тrouq / zulolosi

07/06/2013 at 10:46AM

27
#5 - Kai Yuan / kentyuan

07/06/2013 at 01:36PM

27
#6 - Steve Tjoa / stevetjoa

07/08/2013 at 04:45AM

27
#7 - Bradd Szonye / bszonye

07/10/2013 at 12:55AM

27
#8 - Huu Nguyen / huudev

07/10/2013 at 06:50AM

27
#9 - jan muha / h4ct1c

07/13/2013 at 02:48PM

27
#10 - Ed Zukowski / dataoverflow

07/13/2013 at 02:56PM

27
#11 - Aaron Bieber / aaronbieber

07/14/2013 at 02:31AM

27
#12 - Roland Schatz / fl_Overmind

07/14/2013 at 11:17PM

27
#13 - Andy Balaam / andybalaam

07/17/2013 at 02:40PM

27
#14 - Nathan / NathanHarperoni

07/17/2013 at 04:22PM

27
#15 - Ingo / ist3fani

07/18/2013 at 09:14PM

27
#16 - ———đίxίє—flαтlίиє——— / _dixie_flatline

07/19/2013 at 07:16PM

27
#17 - Felix Stridsberg / FelixStridsberg

08/03/2013 at 01:41PM

27
#18 - Armand Halbert / armandhalbert

08/22/2013 at 02:46PM

27
#19 - hiding / I_haveno_name

10/01/2013 at 11:06PM

27
#20 - Tyler / tylerbindon

10/20/2013 at 06:07PM

27
#21 - thasso / thasso23

10/27/2013 at 08:18PM

27
#22 - Nathan Wallace / nathanmwallace

11/06/2013 at 02:38PM

27
#23 - John Braxler / braxler

03/27/2014 at 06:03PM

27
#24 - Nabi Studios / Toribash

03/29/2014 at 11:06AM

27
#25 - RB / powerage88

04/07/2014 at 10:02PM

27
#26 - wizardwerdna / wizardwerdna

05/21/2014 at 07:31AM

27
#27 - Johannes H. / neVexa

09/23/2014 at 02:28PM

27
#28 - pftb12345 / pftb12345

04/11/2015 at 02:20PM

27
#29 - Daniel / Daniel00288663

04/03/2017 at 03:25PM

28
#30 - Kerson Hsiao / KersonHsiao

09/15/2013 at 01:07AM

29
#31 - curist / curist

07/08/2013 at 09:38AM

29
#32 - Casey Dwyer / caseydwyer

10/24/2013 at 04:28PM

29
#33 - bunnies president / bunnies4p

10/25/2013 at 06:57PM

29
#34 - Caek / Caek_

08/05/2014 at 12:27AM

29
#35 - mark0829 / mark0829

02/25/2015 at 08:23AM

30
#36 - Maksim S. / waynesayonara

07/18/2013 at 07:01PM

30
#37 - Matthew Draper / _matthewd

02/28/2014 at 04:47PM

30
#38 - Lifepillar / lifepillar

08/28/2015 at 02:18PM

31
#39 - David Bell / dastbe

08/08/2013 at 11:07PM

31
#40 - brett / brettyukich

09/19/2013 at 08:16AM

31
#41 - TheProgrammer971 / tp971

03/14/2015 at 03:42PM

32
#42 - John Meisner / jmeisned

06/26/2014 at 06:17PM

33
#43 - Timothée Gauthier / zmf_tim

07/06/2013 at 12:48PM

33
#44 - A / Tower_1980

08/01/2013 at 08:58AM

33
#45 - Sinclair Desaud / sdesaud

09/25/2013 at 09:31PM

33
#46 - James T. Huggett / Jmeshka

10/05/2013 at 05:45PM

33
#47 - newton / newtonsmartt

10/15/2013 at 10:04PM

33
#48 - Ram Tamtam / ramtamtamtam

06/30/2014 at 10:30AM

34
#49 - Quota / Quotad

01/22/2014 at 09:49AM

34
#50 - playalong / playwithit42

07/17/2014 at 05:15AM

35
#51 - Rainer Koirikivi / rkoiriki

07/18/2013 at 11:50AM

35
#52 - cj / cj01101

08/04/2013 at 02:05AM

35
#53 - Dimitar Dimitrov / kurkale6ka

10/25/2013 at 02:58PM

35
#54 - Andrew Ruder / aeruder

11/11/2013 at 08:54PM

35
#55 - David Tabachnikov / davidtab

10/20/2014 at 05:08PM

35
#56 - Mauro Persano / fzort

05/25/2015 at 02:16AM

36
#57 - Andrew Noyes / seyonwerdna

07/08/2013 at 01:43AM

36
#58 - Michael Coles / gen_ale_drinker

08/19/2013 at 03:04PM

36
#59 - NuM / NuM314

10/05/2013 at 10:04PM

36
#60 - A. N. / arez42

10/24/2013 at 12:39PM

36
#61 - gary.klindt@googlema / garstekli

11/14/2013 at 09:51PM

37
#62 - Justin Le / mstk

07/24/2013 at 07:44AM

37
#63 - _ky_ / ultimate_ky

08/13/2013 at 07:22AM

37
#64 - hiroaki yasutomo / kaminaly

09/10/2013 at 01:44AM

37
#65 - Mauro Persano / fzort

11/22/2014 at 12:55PM

38
#66 - Peter Lustig / LustigPeter42

07/29/2013 at 08:41PM

38
#67 - Tzipan / Tzipan

10/27/2013 at 02:07PM

38
#68 - Joonas Pihlajamaa / jokkebk

02/25/2014 at 03:38PM

39
#69 - mnx / mnxx

07/08/2013 at 08:59PM

39
#70 - RobertT / techrt2050

07/10/2013 at 05:35AM

39
#71 - Emile Swarts / EmileSwarts

07/20/2013 at 12:30PM

39
#72 - Oliver Christ / 0liverChrist

09/16/2013 at 04:21PM

39
#73 - Daniel Marjenburgh / dmarjenburgh

11/17/2013 at 02:20PM

40
#74 - Daniel Kovacic / dkov01

09/02/2013 at 09:54PM

40
#75 - Adam McLain / adammclain

10/03/2013 at 09:05PM

40
#76 - evilmoe ☮ / evilmoe

10/14/2013 at 07:50PM

40
#77 - Rodrigo Marchant / rgmarcha

10/16/2013 at 04:22AM

41
#78 - Vestrobaa / Vestrobaa

07/19/2013 at 06:03PM

41
#79 - Bradley Tse / bradleytse

08/30/2013 at 03:07AM

41
#80 - Bob Zingerman / BobZingerman

04/03/2014 at 03:16PM

42
#81 - Leif Bladt / leifbladt

09/04/2013 at 01:22PM

42
#82 - Chenut Ludovic / 7Brwa7

04/13/2016 at 08:36AM

43
#83 - Todd Branchflower / toddbranch

07/17/2013 at 08:08PM

43
#84 - Ian Laird / irlaird

12/13/2013 at 02:02AM

43
#85 - TapTemplate / TapTemplate

06/25/2014 at 07:51PM

43
#86 - deris / deris0126

11/07/2014 at 10:51AM

43
#87 - Gurukandhamoorthi / Gurukandhamoor1

07/29/2017 at 04:18PM

44
#88 - matthew / mdespuits

08/16/2013 at 05:40PM

44
#89 - BIHEL Damien / bihel_d

11/16/2013 at 03:25PM

44
#90 - Eric Potter / pottereric

12/19/2013 at 06:54PM

44
#91 - Kyouma / kyoumaJohn

10/14/2016 at 10:01PM

45
#92 - James Scriven / JamesDScriven

07/06/2013 at 04:47PM

45
#93 - Brian Besmanoff / BrianBesmanoff

07/26/2013 at 01:55AM

45
#94 - Bart of Denver / bartofdenver

08/12/2013 at 05:07AM

45
#95 - Andrew Crites / ExplosionPills

09/13/2013 at 01:27AM

46
#96 - Pedro Santos / pedrosans

04/14/2014 at 06:05PM

47
#97 - galadriel2143 / galadriel2143

07/06/2013 at 09:08AM

49
#98 - Tullio Facchinetti / toolleeo

07/25/2013 at 02:07PM

49
#99 - Jonas K. / geratheon

02/28/2014 at 04:55PM

49
#100 - ZorgroZ / ZorgroZ

04/11/2014 at 09:16PM

51
#101 - Kudryavtsev Alexandr / kudryav_a

08/08/2013 at 06:42AM

51
#102 - James / Dronak

09/17/2013 at 02:32AM

51
#103 - Jonathan Potter / nTypeRed

11/12/2013 at 04:31PM

53
#104 - Volodymyr / vkrest

07/07/2013 at 10:57PM

53
#105 - Carlos A Henríquez Q / lagunex

01/19/2015 at 12:36PM

55
#106 - Daniel Lundin / danielundin

07/09/2013 at 01:59PM

55
#107 - Heath Patterson / HeathPatterson

08/10/2013 at 07:53PM

57
#108 - fSchl / FelixSchlitter

07/16/2013 at 01:26AM

57
#109 - Jeffrey Klein / jeffwklein

08/20/2013 at 07:09PM

58
#110 - tomazy / tomazy

07/07/2013 at 03:40PM

60
#111 - Justin Knag / justinknag

10/10/2014 at 06:04AM

61
#112 - Patrick Pitoscia / Patrick03960431

08/09/2014 at 01:42AM

62
#113 - esiegel / esiegel

07/06/2013 at 06:32PM

63
#114 - barnabaguy / barnabaguy

02/24/2014 at 09:20PM

64
#115 - ltn614 / ltn614

09/24/2015 at 02:39AM

66
#116 - TrentonZero / TrentonZero

07/06/2013 at 01:18AM

67
#117 - codegourmet / codegourmet

10/01/2013 at 12:23PM

68
#118 - Chris Svenningsen / hmmwhatsthis

07/11/2013 at 06:46PM

80
#119 - A.B / _a0b_

07/09/2013 at 01:21AM

112
#120 - Adrian / adrian234b

08/14/2013 at 09:11AM

376
#121 - Julien Pepy / shin_komuta

08/02/2013 at 01:21PM