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):
56
#1 - Conner McDaniel / @connermcd

09/25/2012 at 12:38AM

56
#2 - Urtica dioica / @udioica

01/02/2013 at 05:42PM

56
#3 - John Braxler / @braxler

08/25/2014 at 05:55PM

56
#4 - Peppa Pig / @PeppaPi95550250

06/02/2024 at 09:53AM

60
#5 - Douglas Stockwell / @dstockwell

01/02/2011 at 12:21AM

60
#6 - Wei Dai / @clvv42

01/02/2011 at 12:36AM

60
#7 - You-Siang Lin / @yslinnctu

12/07/2011 at 12:35PM

60
#8 - Benjamin Sullivan / @benjaminsull

12/11/2011 at 01:09PM

63
#9 - Jon Krause / @jkrause314

02/16/2016 at 12:47AM

63
#10 - Qing Liu / @poeminlash

07/31/2022 at 09:48PM

68
#11 - Justin Love / @wondible

08/08/2011 at 03:38PM

75
#12 - Casey Dwyer / @caseydwyer

10/23/2013 at 02:42PM

76
#13 - Tim Chase / @gumnos

01/01/2011 at 01:06PM

76
#14 - Drew Neil / @nelstrom

01/02/2011 at 01:42PM

76
#15 - Francois Marais / @maraisf

10/15/2014 at 04:48PM

77
#16 - Hu Junfeng / @junfeng

07/26/2011 at 09:00AM

79
#17 - Dragan Cvetinovic / @kawkafi

05/22/2011 at 02:00PM

81
#18 - William Dunand / @wdunand

11/21/2011 at 08:41AM

83
#19 - Nándor Komzák / @rubymood

01/02/2011 at 10:10PM

84
#20 - not so punk :] / @notsopunk

06/19/2011 at 04:12PM

85
#21 - rabidpraxis / @rabidpraxis

01/02/2011 at 10:20PM

88
#22 - h_east (トロッコ6個) / @h_east

01/01/2011 at 09:51AM

88
#23 - Naomi Chu / @NaomiChuChunks

05/08/2014 at 07:06PM

88
#24 - Иван / @wansmer

04/24/2023 at 02:21PM

89
#25 - Oliver Christ / @0liverChrist

11/12/2013 at 10:11PM

93
#26 - Karel Vervaeke / @karel1980

01/03/2011 at 10:20AM

93
#27 - Glenn / @spamcow_moo

01/03/2011 at 11:35PM

94
#28 - Austin Taylor / @austintaylor

01/02/2011 at 04:18AM

97
#29 - Clément Nodet / @clementnodet

01/03/2011 at 10:09PM

97
#30 - Akira Matsuda / @a_matsuda

01/05/2011 at 03:46PM