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):
55
#121 - Heath Patterson / @HeathPatterson

08/10/2013 at 07:53PM

57
#122 - fSchl / @FelixSchlitter

07/16/2013 at 01:26AM

57
#123 - Jeff Klein / @ravioli_jazz

08/20/2013 at 07:09PM

58
#124 - tomazy / @tomazy

07/07/2013 at 03:40PM

60
#125 - Justin Knag / @justinknag

10/10/2014 at 06:04AM

61
#126 - Patrick Pitoscia / @Patrick03960431

08/09/2014 at 01:42AM

62
#127 - esiegel / @esiegel

07/06/2013 at 06:32PM

63
#128 - barnabaguy / @barnabaguy

02/24/2014 at 09:20PM

64
#129 - ltn614 / @ltn614

09/24/2015 at 02:39AM

66
#130 - TrentonZero / @TrentonZero

07/06/2013 at 01:18AM

67
#131 - codegourmet / @codegourmet

10/01/2013 at 12:23PM

68
#132 - Chris Svenningsen / @hmmwhatsthis

07/11/2013 at 06:46PM

80
#133 - Alexander Berezovsky / @_a0b_

07/09/2013 at 01:21AM

112
#134 - Adrian / @adrian234b

08/14/2013 at 09:11AM

269
#135 - nickGPT / @nickandbro

08/28/2024 at 06:23PM

376
#136 - Julien Pepy / @shin_komuta

08/02/2013 at 01:21PM