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 5ba020f91abf2d000951055c

Com(m)a Trouble

Someone was real stupid when placing his commas. Can you fix it?

Start file
,0,1,2,3,4,5,6,7,89
,1,2,3,4,5,6,7,8,90
,2,3,4,5,6,7,8,9,01
,3,4,5,6,7,8,9,0,12
,4,5,6,7,8,9,0,1,23
56,7,8,9,0,1,2,3,4,
67,8,9,0,1,2,3,4,5,
78,9,0,1,2,3,4,5,6,
89,0,1,2,3,4,5,6,7,
90,1,2,3,4,5,6,7,8,
End file
0,1,2,3,4,5,6,7,8,9
1,2,3,4,5,6,7,8,9,0
2,3,4,5,6,7,8,9,0,1
3,4,5,6,7,8,9,0,1,2
4,5,6,7,8,9,0,1,2,3
5,6,7,8,9,0,1,2,3,4
6,7,8,9,0,1,2,3,4,5
7,8,9,0,1,2,3,4,5,6
8,9,0,1,2,3,4,5,6,7
9,0,1,2,3,4,5,6,7,8

View Diff

1,10c1,10
< ,0,1,2,3,4,5,6,7,89
< ,1,2,3,4,5,6,7,8,90
< ,2,3,4,5,6,7,8,9,01
< ,3,4,5,6,7,8,9,0,12
< ,4,5,6,7,8,9,0,1,23
< 56,7,8,9,0,1,2,3,4,
< 67,8,9,0,1,2,3,4,5,
< 78,9,0,1,2,3,4,5,6,
< 89,0,1,2,3,4,5,6,7,
< 90,1,2,3,4,5,6,7,8,
---
> 0,1,2,3,4,5,6,7,8,9
> 1,2,3,4,5,6,7,8,9,0
> 2,3,4,5,6,7,8,9,0,1
> 3,4,5,6,7,8,9,0,1,2
> 4,5,6,7,8,9,0,1,2,3
> 5,6,7,8,9,0,1,2,3,4
> 6,7,8,9,0,1,2,3,4,5
> 7,8,9,0,1,2,3,4,5,6
> 8,9,0,1,2,3,4,5,6,7
> 9,0,1,2,3,4,5,6,7,8

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 260 remaining solutions by signing in and submitting your own entry
#261 minjikim / @minjiki38685196 - Score: 92 - 10/10/18 @ 13:04
:<Up><Up><Up>g<Up><Up>/<BS>!/g<BS><CR>:g/<BS>!/^,/normal ^n<BS>0<BS>a,<BS><BS><BS>$x^a,<CR>:<Up><BS><BS><BS><BS><BS>^x$i,<CR>u:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><CR>:<0xe3><0x85><0x88><0xe3><0x85><0x82><BS><BS>wq<CR>

0 comments


Created by: @DustVoice

261 active golfers, 1086 entries

Leaderboard (lowest score wins):
43
#241 - Matze / @ebaharilikult

11/20/2018 at 07:16AM

44
#242 - Fabio Branquinho / @branquif

11/08/2018 at 12:36PM

44
#243 - Joe Francis / @lostapathy

01/13/2019 at 05:27PM

44
#244 - Bruce Park / @bpark0

03/11/2019 at 12:06AM

46
#245 - Why Am / @WhysDeCatOnFire

11/07/2018 at 07:08PM

47
#246 - Calvin Fong / @LordyBaka

11/03/2018 at 10:58AM

48
#247 - Ketan Agrawal / @_ketan0_

10/04/2018 at 03:26AM

48
#248 - Ainsley McGrath / @whole_grainsley

12/24/2018 at 07:18PM

48
#249 - MGJoe93 / @mgjoe93

03/06/2019 at 12:19PM

48
#250 - Vimfiz / @vimfiz

03/21/2019 at 12:20AM

50
#251 - LucaSimplon / @LucaSimplon

11/18/2018 at 08:05PM

51
#252 - Jonny Wilson / @thejondom

12/22/2018 at 05:57PM

53
#253 - tuyen / @tuyen66827418

11/21/2018 at 10:17AM

55
#254 - stefg / @stefg

10/17/2018 at 06:00AM

58
#255 - beew71493 / @beew71493

12/12/2018 at 08:49PM

59
#256 - Di Peng / @DCodier

10/31/2018 at 05:07AM

62
#257 - dogmeat / @dogmeat11

10/24/2018 at 02:12PM

63
#258 - Matheus Rezende / @matheusr_dev

10/22/2018 at 09:16AM

66
#259 - Cole Hudson / @colejhudson

11/21/2018 at 06:08PM

85
#260 - urandom / @ttyrandom

10/19/2018 at 02:36PM

92
#261 - minjikim / @minjiki38685196

10/10/2018 at 01:04PM