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

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

751 active golfers, 2354 entries

Solutions by @GIA917229015:
14
#392 - 咸糖🎯 / @GIA917229015

07/10/2023 at 02:16AM

15
#>465 - 咸糖🎯 / @GIA917229015

07/10/2023 at 02:11AM

16
#>548 - 咸糖🎯 / @GIA917229015

07/10/2023 at 02:16AM

17
#>636 - 咸糖🎯 / @GIA917229015

07/10/2023 at 02:02AM

21
#>712 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:57AM

21
#>712 - 咸糖🎯 / @GIA917229015

07/10/2023 at 02:00AM

22
#>728 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:58AM

23
#>732 - 咸糖🎯 / @GIA917229015

07/09/2023 at 04:25PM

23
#>732 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:57AM

23
#>732 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:57AM

25
#>744 - 咸糖🎯 / @GIA917229015

07/09/2023 at 04:25PM

26
#>748 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:56AM

41
#>751 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:49AM