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 57 remaining solutions by signing in and submitting your own entry
#58 盧小小 / @VegetaLu - Score: 183 - 04/02/22 @ 06:04
j0<C-V>9jI1,1,<Esc>jll<C-V>8jg<C-A>:12<CR><C-V>9jI2,1,<Esc>jll<C-V>8jg<C-A>:22<CR><C-V>9jI3,1,<Esc>jll<C-V>8jg<C-A>:2<CR>qq0vbv:<Esc>q:2<CR>qq0veeexA<Esc>puA,<Esc><50-53>608d040766cd0a0007f52b0d<Esc>[201~upxj0q29@qu29@qu0qqveeexA,<Esc>pxj0q@q25@qj@qkjkk@quj@qu0@q:ww<BS>q<CR>

0 comments


Created by: @canabady

58 active golfers, 212 entries

Leaderboard (lowest score wins):
44
#31 - tien / @tien40766111

12/02/2023 at 01:12PM

45
#32 - Steven / @Hallzy_18

05/07/2021 at 09:55PM

45
#33 - Kevin Ilphrin Pellet / @Kilphrin

08/08/2021 at 09:42PM

45
#34 - 深窓の令嬢@ドクター / @arbino1031

12/19/2021 at 10:03AM

50
#35 - models / @zornificator

06/23/2021 at 12:03PM

56
#36 - Kyle / @Kyle98675198

05/29/2021 at 09:29PM

56
#37 - Dank City / @ddankcity

12/09/2022 at 04:04PM

59
#38 - Maorun / @Maorun11

09/10/2021 at 12:15PM

59
#39 - Thomas Hiron / @thomashiron

02/20/2023 at 11:47AM

61
#40 - emre özküçük / @emreozkucuk

11/04/2023 at 01:34AM

63
#41 - Snurli / @Snurlipus

12/03/2021 at 12:29PM

63
#42 - 으앙 / @meri2727

10/13/2023 at 04:46AM

64
#43 - z00master / @z00master

08/01/2022 at 08:35PM

68
#44 - Quentin Leroy / @qnleroy

08/22/2021 at 01:24PM

70
#45 - Patrick Martin / @PatrickDMartin

06/29/2021 at 08:34AM

70
#46 - Omar Alawadhi / @OmarAla59544225

09/16/2022 at 12:36PM

72
#47 - vimgolfaccfekxh / @vimgolfaccfekxh

10/22/2022 at 02:36AM

76
#48 - Ventura / @vetu11

05/18/2021 at 02:16PM

76
#49 - Bspammer / @Bspammer

08/15/2021 at 03:06PM

77
#50 - Filipe Brandenburger / @filbranden

05/06/2021 at 06:44PM

78
#51 - oleg / @oleg12573505

01/29/2022 at 04:50PM

81
#52 - SwordSwordSwordBird / @SwordSwordBird

09/06/2021 at 01:54AM

82
#53 - grsh / @girish_i_am

05/22/2021 at 07:13AM

83
#54 - Loric Brevet / @lobre8

03/01/2023 at 02:11PM

89
#55 - e1mnos / @e1mnos

08/10/2021 at 02:51PM

112
#56 - Alex Lewin / @_AlexLewin

09/21/2022 at 02:03PM

115
#57 - wangfengguo / @wangfengguo

05/30/2021 at 04:16PM

183
#58 - 盧小小 / @VegetaLu

04/02/2022 at 06:04AM