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 @kimberlycreates:

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

753 active golfers, 2357 entries

Solutions by @kimberlycreates:
13
#107 - kimber gonzalez / @kimberlycreates

01/08/2015 at 02:54PM

13
#>107 - kimber gonzalez / @kimberlycreates

01/08/2015 at 02:55PM

14
#>312 - kimber gonzalez / @kimberlycreates

01/08/2015 at 02:53PM

15
#>425 - kimber gonzalez / @kimberlycreates

01/08/2015 at 02:52PM

16
#>514 - kimber gonzalez / @kimberlycreates

01/08/2015 at 02:52PM

17
#>593 - kimber gonzalez / @kimberlycreates

01/08/2015 at 02:51PM

18
#>651 - kimber gonzalez / @kimberlycreates

01/08/2015 at 02:50PM

19
#>672 - kimber gonzalez / @kimberlycreates

01/08/2015 at 02:49PM

20
#>694 - kimber gonzalez / @kimberlycreates

01/08/2015 at 02:47PM

24
#>738 - kimber gonzalez / @kimberlycreates

01/08/2015 at 02:46PM

25
#>743 - kimber gonzalez / @kimberlycreates

01/08/2015 at 02:44PM