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

757 active golfers, 2372 entries

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

07/10/2023 at 02:16AM

15
#>468 - 咸糖🎯 / @GIA917229015

07/10/2023 at 02:11AM

16
#>551 - 咸糖🎯 / @GIA917229015

07/10/2023 at 02:16AM

17
#>641 - 咸糖🎯 / @GIA917229015

07/10/2023 at 02:02AM

21
#>718 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:57AM

21
#>718 - 咸糖🎯 / @GIA917229015

07/10/2023 at 02:00AM

22
#>734 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:58AM

23
#>738 - 咸糖🎯 / @GIA917229015

07/09/2023 at 04:25PM

23
#>738 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:57AM

23
#>738 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:57AM

25
#>750 - 咸糖🎯 / @GIA917229015

07/09/2023 at 04:25PM

26
#>754 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:56AM

41
#>757 - 咸糖🎯 / @GIA917229015

07/10/2023 at 01:49AM