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

753 active golfers, 2357 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
#>637 - 咸糖🎯 / @GIA917229015

07/10/2023 at 02:02AM

21
#>714 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:57AM

21
#>714 - 咸糖🎯 / @GIA917229015

07/10/2023 at 02:00AM

22
#>730 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:58AM

23
#>734 - 咸糖🎯 / @GIA917229015

07/09/2023 at 04:25PM

23
#>734 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:57AM

23
#>734 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:57AM

25
#>746 - 咸糖🎯 / @GIA917229015

07/09/2023 at 04:25PM

26
#>750 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:56AM

41
#>753 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:49AM