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

136 active golfers, 363 entries

Leaderboard (lowest score wins):
41
#91 - Vestrobaa / @Vestrobaa

07/19/2013 at 06:03PM

41
#92 - Bradley Tse / @bradleytse

08/30/2013 at 03:07AM

41
#93 - Bob Zingerman / @BobZingerman

04/03/2014 at 03:16PM

42
#94 - Leif Bladt / @leifbladt

09/04/2013 at 01:22PM

42
#95 - Chenut Ludovic / @7Brwa7

04/13/2016 at 08:36AM

43
#96 - Todd Branchflower / @toddbranch

07/17/2013 at 08:08PM

43
#97 - Ian Laird / @irlaird

12/13/2013 at 02:02AM

43
#98 - TapTemplate / @TapTemplate

06/25/2014 at 07:51PM

43
#99 - deris / @deris0126

11/07/2014 at 10:51AM

43
#100 - Gurukandhamoorthi / @Gurukandhamoor1

07/29/2017 at 04:18PM

44
#101 - matthew / @mdespuits

08/16/2013 at 05:40PM

44
#102 - BIHEL Damien / @bihel_d

11/16/2013 at 03:25PM

44
#103 - Eric Potter / @pottereric

12/19/2013 at 06:54PM

44
#104 - Kyouma / @kyoumaJohn

10/14/2016 at 10:01PM

45
#105 - James Scriven / @JamesDScriven

07/06/2013 at 04:47PM

45
#106 - Brian Besmanoff / @BrianBesmanoff

07/26/2013 at 01:55AM

45
#107 - Bart of Denver / @bartofdenver

08/12/2013 at 05:07AM

45
#108 - Andrew Crites / @ExplosionPills

09/13/2013 at 01:27AM

46
#109 - Pedro Santos / @pedrosans

04/14/2014 at 06:05PM

47
#110 - galadriel2143 / @galadriel2143

07/06/2013 at 09:08AM

49
#111 - Tullio Facchinetti / @toolleeo

07/25/2013 at 02:07PM

49
#112 - Jonas K. / @geratheon

02/28/2014 at 04:55PM

49
#113 - ZorgroZ / @ZorgroZ

04/11/2014 at 09:16PM

49
#114 - Siddharth Murali / @SidTweetsALess

08/26/2022 at 09:29AM

51
#115 - Kudryavtsev Alexandr / @kudryav_a

08/08/2013 at 06:42AM

51
#116 - James / @Dronak

09/17/2013 at 02:32AM

51
#117 - Jonathan Potter / @nTypeRed

11/12/2013 at 04:31PM

53
#118 - Volodymyr / @vkrest

07/07/2013 at 10:57PM

53
#119 - Carlos A Henríquez Q / @lagunex

01/19/2015 at 12:36PM

55
#120 - Daniel Lundin / @danielundin

07/09/2013 at 01:59PM