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 4d1ed78425ba287b2a000227

CSV to JSON

A search for shortest vimissh way to convert CSV to JSON.

Start file
Year,Make,Model,Length
1997,Ford,E350,2.34
2000,Mercury,Cougar,2.38
End file
[
	{
		"Year": "1997",
		"Make": "Ford",
		"Model": "E350",
		"Length": "2.34"
	},
	{
		"Year": "2000",
		"Make": "Mercury",
		"Model": "Cougar",
		"Length": "2.38"
	}
]

View Diff

1,3c1,14
< Year,Make,Model,Length
< 1997,Ford,E350,2.34
< 2000,Mercury,Cougar,2.38
---
> [
> 	{
> 		"Year": "1997",
> 		"Make": "Ford",
> 		"Model": "E350",
> 		"Length": "2.34"
> 	},
> 	{
> 		"Year": "2000",
> 		"Make": "Mercury",
> 		"Model": "Cougar",
> 		"Length": "2.38"
> 	}
> ]

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 58 remaining solutions by signing in and submitting your own entry
#59 ise0615 / @ise0615 - Score: 395 - 05/13/12 @ 07:35
i"<Esc>wwi"<Right><CR>"<Esc>ww.ui"<Right><CR><Esc>.ui"<Esc>wwi"<Right><CR><Esc>.ui"<Esc>wwkwwblllllla"<CR><Esc>jkkkkkkkk$a<BS>:<Down><BS>:<Down><Right><BS>:<Down><Right>:<Esc>jkkkkkk0i[<CR>{<CR><Esc>jjjji},<CR><Esc>kkkkkkvjjjjjlljkhhyjjjjjpi,<CR><Esc>jjjjjlxji]<Esc>jv$dkkkkkkkkkkkk$pi <Esc>wwlv$djla <Esc>plllllv$djla <Esc>pllllv<Esc>lDjja<Esc>phhhi <Esc>kddjjjjjjjjjjjddkkkkk$pi<BS> <Esc>llllllDjla <Esc>pbbbbbv$duv$hdjla <Esc>pbhbv$duv$hdjla <Esc>pa"<Esc>hhhh.ub.u<Left><Left>.<Up><Left><Left>.<Up><Left><Left>.<Up><Left>.<Right><Right><Right><Right>.<Down><Right><Right>.<Down><Left>.<Up><Up><Up><Up><Up>.<Up><Left>.<Up><Left>.<Up><Left>.<Left><Left><Left><Left><Left>.<Down><Left>.<Down><Left><Right>.<Down><Right><Left>.<Esc>0kkkk<C-V>jjjjj>jl<C-V>jjjjk>jjjjj<C-V>jjjjj>jl<C-V>jjj>ZZ

0 comments


Created by: @Ujjwol

59 active golfers, 143 entries

Leaderboard (lowest score wins):
105
#31 - Matti Hänninen / @mjhanninen

01/30/2011 at 02:32PM

106
#32 - Asmund / @herrasbe

01/01/2011 at 08:32PM

107
#33 - Aaron Miller / @apage43

08/13/2012 at 02:11AM

112
#34 - Ben Buckley / @_benb

09/13/2013 at 07:34PM

114
#35 - Øystein Walle / @oysteinwalle

07/06/2011 at 09:24AM

115
#36 - Clive Evans / @swish_bob

01/01/2011 at 10:49PM

116
#37 - Behnam Esfahbod / @zwnj

01/01/2011 at 02:57PM

120
#38 - Christoph Stock / @christophstock

01/01/2011 at 04:15PM

121
#39 -  Ikhsan Maulana / @ixandidu

01/15/2011 at 09:02AM

127
#40 - Renat Aksitov / @Korvin79

02/06/2012 at 07:19PM

129
#41 - Francisco Dibar / @frandibar

01/12/2011 at 10:28PM

131
#42 - George GZ Zakhour / @AlloGeorge

10/01/2013 at 12:40PM

145
#43 - Rob Ciaccio / @RobertoCalavera

02/01/2011 at 05:28PM

150
#44 - Alain Gilbert / @alain_gilbert

01/01/2011 at 08:44PM

152
#45 - davidnorth / @davidnorth

01/02/2011 at 12:51AM

153
#46 - Justin Cullen / @zenguine

02/29/2012 at 06:34AM

155
#47 - 無ん垢の叫び / @john_ababa

02/24/2012 at 08:10AM

155
#48 - Dr. Rev. J. "Paranoid Android" Kirchartz / @JKirchartz

12/21/2018 at 06:10PM

156
#49 - Przemysław Pawełczyk / @przemoc86

01/15/2011 at 10:29PM

157
#50 - Franco Lazzarino / @flazz

01/04/2011 at 08:19PM

158
#51 - Christopher Brew / @Seph1rothVII

01/13/2012 at 06:51PM

161
#52 - drio / @drio

01/16/2011 at 03:48PM

166
#53 - Lajos Koszti / @Ajnasz

01/06/2011 at 01:48PM

176
#54 - Adrian Silva / @scyldinga

01/10/2012 at 10:29AM

204
#55 - Christopher Sexton / @crsexton

01/01/2011 at 08:08PM

210
#56 - Ilya Ermolin / @ermolinis

01/01/2011 at 07:25PM

231
#57 - Mitch LeBlanc / @symmitchry

10/22/2014 at 05:20AM

272
#58 - Dan Williams / @deft_of_center

04/03/2013 at 04:02AM

395
#59 - ise0615 / @ise0615

05/13/2012 at 07:35AM