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 536cfa23fcccd100025678bd

Extract argument from function

The aim is to see if you can do some refactoring very fast.

Start file
attr("y",function(v){return v})
End file
f=function(v){return v};
attr("y",f)

View Diff

1c1,2
< attr("y",function(v){return v})
---
> f=function(v){return v};
> attr("y",f)

Solutions by @ivanbrennan:

Unlock 13 remaining solutions by signing in and submitting your own entry
Created by: @EdgarHipp

753 active golfers, 2357 entries

Solutions by @ivanbrennan:
13
#31 - Ivan Brennan / @ivanbrennan

05/28/2014 at 02:24AM

13
#>76 - Ivan Brennan / @ivanbrennan

08/06/2014 at 03:53AM

13
#>101 - Ivan Brennan / @ivanbrennan

11/29/2014 at 09:09PM

14
#>285 - Ivan Brennan / @ivanbrennan

05/28/2014 at 02:20AM

15
#>406 - Ivan Brennan / @ivanbrennan

05/28/2014 at 02:19AM

15
#>417 - Ivan Brennan / @ivanbrennan

08/06/2014 at 03:51AM

15
#>417 - Ivan Brennan / @ivanbrennan

08/06/2014 at 03:52AM

16
#>475 - Ivan Brennan / @ivanbrennan

05/28/2014 at 02:16AM

16
#>493 - Ivan Brennan / @ivanbrennan

08/06/2014 at 03:51AM

16
#>512 - Ivan Brennan / @ivanbrennan

11/29/2014 at 09:05PM

18
#>651 - Ivan Brennan / @ivanbrennan

11/29/2014 at 09:09PM

21
#>704 - Ivan Brennan / @ivanbrennan

05/28/2014 at 02:14AM

27
#>751 - Ivan Brennan / @ivanbrennan

11/29/2014 at 09:03PM