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):
35
#61 - cj / @cj01101

08/04/2013 at 02:05AM

35
#62 - Dimitar Dimitrov / @kurkale6ka

10/25/2013 at 02:58PM

35
#63 - Andrew Ruder / @aeruder

11/11/2013 at 08:54PM

35
#64 - David Tabachnikov / @davidtab

10/20/2014 at 05:08PM

35
#65 - Mauro Persano / @fzort

05/25/2015 at 02:16AM

36
#66 - Andrew Noyes / @seyonwerdna

07/08/2013 at 01:43AM

36
#67 - Michael Coles / @gen_ale_drinker

08/19/2013 at 03:04PM

36
#68 - NuM / @NuM314

10/05/2013 at 10:04PM

36
#69 - A. N. / @arez42

10/24/2013 at 12:39PM

36
#70 - gary.klindt@googlema / @garstekli

11/14/2013 at 09:51PM

37
#71 - Justin Le / @mstk

07/24/2013 at 07:44AM

37
#72 - _ky_ / @ultimate_ky

08/13/2013 at 07:22AM

37
#73 - hiroaki yasutomo / @kaminaly

09/10/2013 at 01:44AM

37
#74 - Mauro Persano / @fzort

11/22/2014 at 12:55PM

37
#75 - POSIX / @po6ix

01/22/2022 at 04:03PM

37
#76 - Jan Scholz / @radikalliberal

10/19/2024 at 06:16AM

38
#77 - Peter Lustig / @LustigPeter42

07/29/2013 at 08:41PM

38
#78 - Tzipan / @Tzipan

10/27/2013 at 02:07PM

38
#79 - Joonas Pihlajamaa / @jokkebk

02/25/2014 at 03:38PM

39
#80 - mnx / @mnxx

07/08/2013 at 08:59PM

39
#81 - RobertT / @techrt2050

07/10/2013 at 05:35AM

39
#82 - Emile Swarts / @EmileSwarts

07/20/2013 at 12:30PM

39
#83 - Oliver Christ / @0liverChrist

09/16/2013 at 04:21PM

39
#84 - Daniel Marjenburgh / @dmarjenburgh

11/17/2013 at 02:20PM

40
#85 - Daniel Kovacic / @dkov01

09/02/2013 at 09:54PM

40
#86 - Adam McLain / @adammclain

10/03/2013 at 09:05PM

40
#87 - evilmoe ☮ / @evilmoe

10/14/2013 at 07:50PM

40
#88 - Rodrigo Marchant / @rgmarcha

10/16/2013 at 04:22AM

40
#89 - RockerZZY / @rocker_zzy

06/10/2020 at 11:22PM

40
#90 - vimgolfaccfekxh / @vimgolfaccfekxh

10/30/2022 at 11:06PM