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 by @clvv42:

Unlock 10 remaining solutions by signing in and submitting your own entry
Created by: @Ujjwol

66 active golfers, 173 entries

Solutions by @clvv42:
60
#6 - Wei Dai / @clvv42

01/02/2011 at 12:36AM

61
#>8 - Wei Dai / @clvv42

01/02/2011 at 12:09AM

62
#>8 - Wei Dai / @clvv42

01/02/2011 at 12:04AM

67
#>10 - Wei Dai / @clvv42

01/01/2011 at 10:55PM

69
#>11 - Wei Dai / @clvv42

01/01/2011 at 10:49PM

73
#>11 - Wei Dai / @clvv42

01/01/2011 at 02:32PM

83
#>18 - Wei Dai / @clvv42

01/01/2011 at 09:37AM

87
#>21 - Wei Dai / @clvv42

01/01/2011 at 09:21AM

88
#>21 - Wei Dai / @clvv42

01/01/2011 at 09:07AM

92
#>25 - Wei Dai / @clvv42

01/01/2011 at 08:27AM