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 608d040766cd0a0007f52b0d

Increment number for every 10 lines

The file consists of 2 columns (code and percentage). We need to add 2 more columns with increasing number for 4th column (Xcols) and increment 3rd column (Ycols) only for every 10 lines with reset of 4th column

Start file
code,percentage,Ycols,Xcols
52,67.88
233,66.61
119,66.26
37,63.88
21,63.31
85,62.78
22,60.9
109,60.84
96,57.75
51,57.64
210,57.54
205,57.53
113,57.3
97,57.09
66,56.37
10,56.21
49,56.05
248,55.87
68,55.76
87,55.51
29,54.99
93,54.84
11,54.77
186,54.64
27,54.52
220,54.5
89,54.32
151,53.36
47,53.34
212,53.28
End file
code,percentage,Ycols,Xcols
52,67.88,1,1
233,66.61,1,2
119,66.26,1,3
37,63.88,1,4
21,63.31,1,5
85,62.78,1,6
22,60.9,1,7
109,60.84,1,8
96,57.75,1,9
51,57.64,1,10
210,57.54,2,1
205,57.53,2,2
113,57.3,2,3
97,57.09,2,4
66,56.37,2,5
10,56.21,2,6
49,56.05,2,7
248,55.87,2,8
68,55.76,2,9
87,55.51,2,10
29,54.99,3,1
93,54.84,3,2
11,54.77,3,3
186,54.64,3,4
27,54.52,3,5
220,54.5,3,6
89,54.32,3,7
151,53.36,3,8
47,53.34,3,9
212,53.28,3,10

View Diff

2,31c2,31
< 52,67.88
< 233,66.61
< 119,66.26
< 37,63.88
< 21,63.31
< 85,62.78
< 22,60.9
< 109,60.84
< 96,57.75
< 51,57.64
< 210,57.54
< 205,57.53
< 113,57.3
< 97,57.09
< 66,56.37
< 10,56.21
< 49,56.05
< 248,55.87
< 68,55.76
< 87,55.51
< 29,54.99
< 93,54.84
< 11,54.77
< 186,54.64
< 27,54.52
< 220,54.5
< 89,54.32
< 151,53.36
< 47,53.34
< 212,53.28
---
> 52,67.88,1,1
> 233,66.61,1,2
> 119,66.26,1,3
> 37,63.88,1,4
> 21,63.31,1,5
> 85,62.78,1,6
> 22,60.9,1,7
> 109,60.84,1,8
> 96,57.75,1,9
> 51,57.64,1,10
> 210,57.54,2,1
> 205,57.53,2,2
> 113,57.3,2,3
> 97,57.09,2,4
> 66,56.37,2,5
> 10,56.21,2,6
> 49,56.05,2,7
> 248,55.87,2,8
> 68,55.76,2,9
> 87,55.51,2,10
> 29,54.99,3,1
> 93,54.84,3,2
> 11,54.77,3,3
> 186,54.64,3,4
> 27,54.52,3,5
> 220,54.5,3,6
> 89,54.32,3,7
> 151,53.36,3,8
> 47,53.34,3,9
> 212,53.28,3,10

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 37 remaining solutions by signing in and submitting your own entry
#38 wangfengguo / @wangfengguo - Score: 115 - 05/30/21 @ 16:16
:let x=1<CR>:let y=1<CR>jqaA,<C-R>=y<CR>,<C-R>=x<CR><Esc>:let x+=1<CR>jq9@a:ley<BS>t y=2<CR>:let x=q<BS>1<CR>10@q10@a:ley<BS>t y=3<BS><BS><BS><BS><BS><BS><BS><BS>:let <Up><CR>:<Up><Up><BS>3<CR>10@aZZ

0 comments


Created by: @canabady

38 active golfers, 123 entries

Leaderboard (lowest score wins):
25
#1 - Lisa Ugray / @lisa_ugray

08/16/2021 at 07:30PM

25
#2 - John Braxler / @braxler

09/03/2021 at 05:08PM

25
#3 - Roman Privalov / @RomanPrivalov

09/07/2021 at 11:27AM

26
#4 - Jon Krause / @jkrause314

05/01/2021 at 04:27PM

26
#5 - Eric Söderström / @eksoderstrom

05/02/2021 at 08:51PM

26
#6 - Smylers / @Smylers2

05/07/2021 at 06:27AM

26
#7 - Miłosz Łakomy / @foobar01123

05/15/2021 at 02:59PM

26
#8 - chocolate / @chocola81394123

05/23/2021 at 09:54AM

26
#9 - Hugh / @haquaman

05/26/2021 at 03:42AM

26
#10 - hiramayo / @hiramayo2

06/23/2021 at 08:37AM

26
#11 - Georg Bökman / @BokmanGeorg

07/02/2021 at 11:56AM

26
#12 - Yondonjamts Ganzorig / @yondonjamts_g

08/11/2021 at 12:20PM

26
#13 - Ochirsum / @Ochirsum11

08/11/2021 at 12:39PM

26
#14 - Trần Chí Thiện / @tecix

08/19/2021 at 03:28PM

26
#15 - $HA-|| / @s_k0731

11/29/2021 at 04:25PM

28
#16 - iBhagwan / @iiBhagwan

07/03/2021 at 08:55AM

28
#17 - 悟史 / @A1OBJTxN5fTg5EJ

07/11/2021 at 12:15PM

39
#18 - Daniel Qu / @danielq9871

05/08/2021 at 03:31PM

39
#19 - xing yang / @yangxing844

05/09/2021 at 03:07PM

39
#20 - simplelife2010 / @simplelife20101

05/12/2021 at 11:19PM

39
#21 - Kurtis D. Miller / @phdkurt

05/25/2021 at 06:03PM

39
#22 - quemeraisc / @quemeraisc

08/22/2021 at 04:21PM

43
#23 - Jean George / @JeanGeo20504212

11/21/2021 at 12:16AM

45
#24 - Steven / @Hallzy_18

05/07/2021 at 09:55PM

45
#25 - sap / @sap38838304

07/01/2021 at 11:19PM

45
#26 - Kevin Ilphrin Pellet / @Kilphrin

08/08/2021 at 09:42PM

50
#27 - models / @zornificator

06/23/2021 at 12:03PM

56
#28 - Kyle / @Kyle98675198

05/29/2021 at 09:29PM

59
#29 - Maorun / @Maorun11

09/10/2021 at 12:15PM

68
#30 - Quentin Leroy / @qnleroy

08/22/2021 at 01:24PM