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 by @kimurayuuji79:

Unlock 9 remaining solutions by signing in and submitting your own entry
Created by: @canabady

59 active golfers, 213 entries

Solutions by @kimurayuuji79:
30
#23 - キムラ・OPEL・ユウジ / @kimurayuuji79

10/13/2022 at 03:19AM

31
#>23 - キムラ・OPEL・ユウジ / @kimurayuuji79

10/13/2022 at 12:25AM

33
#>23 - キムラ・OPEL・ユウジ / @kimurayuuji79

10/12/2022 at 09:45AM

33
#>23 - キムラ・OPEL・ユウジ / @kimurayuuji79

10/12/2022 at 09:51AM

34
#>23 - キムラ・OPEL・ユウジ / @kimurayuuji79

10/12/2022 at 09:42AM

35
#>23 - キムラ・OPEL・ユウジ / @kimurayuuji79

10/12/2022 at 09:40AM

37
#>23 - キムラ・OPEL・ユウジ / @kimurayuuji79

10/12/2022 at 03:57AM

38
#>23 - キムラ・OPEL・ユウジ / @kimurayuuji79

10/12/2022 at 03:53AM

42
#>27 - キムラ・OPEL・ユウジ / @kimurayuuji79

10/12/2022 at 03:41AM