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 65 remaining solutions by signing in and submitting your own entry
#66 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

66 active golfers, 173 entries

Leaderboard (lowest score wins):
100
#31 - Marian Schubert / @MarianSchubert

01/01/2011 at 11:03PM

101
#32 - Pete Johns / @johnsyweb

01/10/2011 at 05:59PM

104
#33 - Aurélien Delahaye / @alkove

01/01/2011 at 03:52PM

105
#34 - Matti Hänninen / @mjhanninen

01/30/2011 at 02:32PM

106
#35 - Asmund / @herrasbe

01/01/2011 at 08:32PM

107
#36 - Aaron Miller / @apage43

08/13/2012 at 02:11AM

112
#37 - Ben Buckley / @_benb

09/13/2013 at 07:34PM

114
#38 - Øystein Walle / @oysteinwalle

07/06/2011 at 09:24AM

115
#39 - Clive Evans / @swish_bob

01/01/2011 at 10:49PM

116
#40 - Behnam Esfahbod / @zwnj

01/01/2011 at 02:57PM

120
#41 - Christoph Stock / @christophstock

01/01/2011 at 04:15PM

121
#42 -  Ikhsan Maulana / @ixandidu

01/15/2011 at 09:02AM

127
#43 - Renat Aksitov / @Korvin79

02/06/2012 at 07:19PM

129
#44 - Francisco Dibar / @frandibar

01/12/2011 at 10:28PM

131
#45 - George GZ Zakhour / @AlloGeorge

10/01/2013 at 12:40PM

145
#46 - Rob Ciaccio / @RobertoCalavera

02/01/2011 at 05:28PM

147
#47 - marten / @_m4r73n

09/06/2023 at 08:39PM

150
#48 - Alain Gilbert / @alain_gilbert

01/01/2011 at 08:44PM

152
#49 - davidnorth / @davidnorth

01/02/2011 at 12:51AM

153
#50 - Justin Cullen / @zenguine

02/29/2012 at 06:34AM

155
#51 - じょんあば / @john_ababa

02/24/2012 at 08:10AM

155
#52 - Dr Rev J. “I am not a bot!” Kirchartz, KSC, KHS / @JKirchartz

12/21/2018 at 06:10PM

155
#53 - evgenii-kokorin / @evgenii-kokorin

02/15/2024 at 07:06PM

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

01/15/2011 at 10:29PM

157
#55 - Franco Lazzarino / @flazz

01/04/2011 at 08:19PM

158
#56 - Christopher Brew / @Seph1rothVII

01/13/2012 at 06:51PM

161
#57 - drio / @drio

01/16/2011 at 03:48PM

166
#58 - Lajos Koszti / @Ajnasz

01/06/2011 at 01:48PM

171
#59 - shahanavaz m / @shahanavazm

02/15/2022 at 04:54PM

176
#60 - Adrian Silva / @scyldinga

01/10/2012 at 10:29AM