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):
27
#31 - Daniel / @Daniel00288663

04/03/2017 at 03:25PM

27
#32 - DHM / @DHM29978992

05/08/2018 at 01:07AM

27
#33 - Mihai / @mihaicristiant

03/21/2019 at 11:37AM

27
#34 - Lory / @Lory46845742

12/19/2019 at 03:36PM

27
#35 - Jean George / @JeanGeo20504212

04/25/2022 at 07:46AM

28
#36 - Kerson Hsiao / @KersonHsiao

09/15/2013 at 01:07AM

28
#37 - Berel94 / @Berel94

04/05/2024 at 09:28PM

29
#38 - curist / @curist

07/08/2013 at 09:38AM

29
#39 - Casey Dwyer / @caseydwyer

10/24/2013 at 04:28PM

29
#40 - bunnies president / @bunnies4p

10/25/2013 at 06:57PM

29
#41 - Caek / @Caek_

08/05/2014 at 12:27AM

29
#42 - mark0829 / @mark0829

02/25/2015 at 08:23AM

30
#43 - Maksim S. / @waynesayonara

07/18/2013 at 07:01PM

30
#44 - Matthew Draper / @_matthewd

02/28/2014 at 04:47PM

30
#45 - Lifepillar / @lifepillar

08/28/2015 at 02:18PM

31
#46 - David Bell / @dastbe

08/08/2013 at 11:07PM

31
#47 - brett / @brettyukich

09/19/2013 at 08:16AM

31
#48 - TheProgrammer971 / @tp971

03/14/2015 at 03:42PM

31
#49 - Olivier Bégassat / @zk_evm

06/15/2023 at 02:04PM

32
#50 - John Meisner / @jmeisned

06/26/2014 at 06:17PM

32
#51 - x03n046 / @x03n046

05/25/2022 at 03:39AM

33
#52 - zmf_tim / @zmf_tim

07/06/2013 at 12:48PM

33
#53 - A / @Tower_1980

08/01/2013 at 08:58AM

33
#54 - Sinclair Desaud / @sdesaud

09/25/2013 at 09:31PM

33
#55 - James T. Huggett / @Jmeshka

10/05/2013 at 05:45PM

33
#56 - newton / @newtonsmartt

10/15/2013 at 10:04PM

33
#57 - Ram Tamtam / @ramtamtamtam

06/30/2014 at 10:30AM

34
#58 - Quota / @Quotad

01/22/2014 at 09:49AM

34
#59 - playalong / @playwithit42

07/17/2014 at 05:15AM

35
#60 - Rainer Koirikivi / @rkoiriki

07/18/2013 at 11:50AM