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

132 active golfers, 349 entries

Leaderboard (lowest score wins):
27
#31 - DHM / @DHM29978992

05/08/2018 at 01:07AM

27
#32 - Mihai / @mihaicristiant

03/21/2019 at 11:37AM

27
#33 - Lory / @Lory46845742

12/19/2019 at 03:36PM

27
#34 - Jean George / @JeanGeo20504212

04/25/2022 at 07:46AM

28
#35 - Kerson Hsiao / @KersonHsiao

09/15/2013 at 01:07AM

29
#36 - curist / @curist

07/08/2013 at 09:38AM

29
#37 - Casey Dwyer / @caseydwyer

10/24/2013 at 04:28PM

29
#38 - bunnies president / @bunnies4p

10/25/2013 at 06:57PM

29
#39 - Caek / @Caek_

08/05/2014 at 12:27AM

29
#40 - mark0829 / @mark0829

02/25/2015 at 08:23AM

30
#41 - Maksim S. / @waynesayonara

07/18/2013 at 07:01PM

30
#42 - Matthew Draper / @_matthewd

02/28/2014 at 04:47PM

30
#43 - Lifepillar / @lifepillar

08/28/2015 at 02:18PM

31
#44 - David Bell / @dastbe

08/08/2013 at 11:07PM

31
#45 - brett / @brettyukich

09/19/2013 at 08:16AM

31
#46 - TheProgrammer971 / @tp971

03/14/2015 at 03:42PM

31
#47 - Olivier B├ęgassat / @zk_evm

06/15/2023 at 02:04PM

32
#48 - John Meisner / @jmeisned

06/26/2014 at 06:17PM

32
#49 - x03n046 / @x03n046

05/25/2022 at 03:39AM

33
#50 - zmf_tim / @zmf_tim

07/06/2013 at 12:48PM

33
#51 - A / @Tower_1980

08/01/2013 at 08:58AM

33
#52 - Sinclair Desaud / @sdesaud

09/25/2013 at 09:31PM

33
#53 - James T. Huggett / @Jmeshka

10/05/2013 at 05:45PM

33
#54 - newton / @newtonsmartt

10/15/2013 at 10:04PM

33
#55 - Ram Tamtam / @ramtamtamtam

06/30/2014 at 10:30AM

34
#56 - Quota / @Quotad

01/22/2014 at 09:49AM

34
#57 - playalong / @playwithit42

07/17/2014 at 05:15AM

35
#58 - Rainer Koirikivi / @rkoiriki

07/18/2013 at 11:50AM

35
#59 - cj / @cj01101

08/04/2013 at 02:05AM

35
#60 - Dimitar Dimitrov / @kurkale6ka

10/25/2013 at 02:58PM