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

728 active golfers, 2215 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
#>273 - Ivan Brennan / @ivanbrennan

05/28/2014 at 02:20AM

15
#>389 - Ivan Brennan / @ivanbrennan

05/28/2014 at 02:19AM

15
#>400 - Ivan Brennan / @ivanbrennan

08/06/2014 at 03:51AM

15
#>400 - Ivan Brennan / @ivanbrennan

08/06/2014 at 03:52AM

16
#>457 - Ivan Brennan / @ivanbrennan

05/28/2014 at 02:16AM

16
#>475 - Ivan Brennan / @ivanbrennan

08/06/2014 at 03:51AM

16
#>494 - Ivan Brennan / @ivanbrennan

11/29/2014 at 09:05PM

18
#>629 - Ivan Brennan / @ivanbrennan

11/29/2014 at 09:09PM

21
#>680 - Ivan Brennan / @ivanbrennan

05/28/2014 at 02:14AM

27
#>726 - Ivan Brennan / @ivanbrennan

11/29/2014 at 09:03PM