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 56a260eedb173f2f5d00f6f8

JS notation to Immutable.js notation

Now Immutable.js made its way into many frontends. This challenge consists of a typical refactoring that many of us are facing now.

Start file
lines[1][1] = 'hello'
lines[2][0] = 'world'
lines[3][1] = 'whats'
lines[10][2] = 'going'
lines[12][1] = 'on'
End file
lines
	.setIn([1, 1], 'hello')
	.setIn([2, 0], 'world')
	.setIn([3, 1], 'whats')
	.setIn([10, 2], 'going')
	.setIn([12, 1], 'on')

View Diff

1,5c1,6
< lines[1][1] = 'hello'
< lines[2][0] = 'world'
< lines[3][1] = 'whats'
< lines[10][2] = 'going'
< lines[12][1] = 'on'
---
> lines
> 	.setIn([1, 1], 'hello')
> 	.setIn([2, 0], 'world')
> 	.setIn([3, 1], 'whats')
> 	.setIn([10, 2], 'going')
> 	.setIn([12, 1], 'on')

Solutions by @18kehops:

Unlock 7 remaining solutions by signing in and submitting your own entry
Created by: @TimSuchanek

59 active golfers, 155 entries

Solutions by @18kehops:
35
#12 - Daniel Suh / @18kehops

02/02/2016 at 03:47PM

35
#>12 - Daniel Suh / @18kehops

02/02/2016 at 03:48PM

40
#>33 - Daniel Suh / @18kehops

02/02/2016 at 03:46PM

44
#>44 - Daniel Suh / @18kehops

02/02/2016 at 03:44PM

48
#>51 - Daniel Suh / @18kehops

02/02/2016 at 03:42PM

60
#>57 - Daniel Suh / @18kehops

02/02/2016 at 03:41PM

154
#>59 - Daniel Suh / @18kehops

02/02/2016 at 03:36PM