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

122 active golfers, 316 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

27
#30 - DHM / @DHM29978992

05/08/2018 at 01:07AM