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)
1c1,2
< attr("y",function(v){return v})
---
> f=function(v){return v};
> attr("y",f)
Solutions
The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!
Check out these helpful resources to improve your Vim skills... Game on.
Unlock
728 remaining solutions by
signing in and submitting your own entry
#729
BitLad / @BitLad -
Score: 30 -
01/31/18 @ 18:37
veeeexo<Esc>paf)<Esc>kIf=<Esc>A;<Esc>hx:w<CR>:wq<CR>
0 comments
729 active golfers, 2218 entries
Leaderboard (lowest score wins):
03/16/2015 at 02:38PM
03/25/2015 at 01:56PM
11/13/2015 at 01:57AM
06/21/2016 at 09:56AM
02/22/2017 at 02:17AM
10/15/2017 at 07:37AM
11/01/2017 at 07:52PM
02/14/2018 at 04:54PM
06/11/2018 at 01:32PM
01/02/2019 at 10:35PM
03/19/2019 at 03:01AM
08/04/2019 at 09:20PM
11/02/2019 at 10:11AM
07/29/2020 at 08:54AM
05/24/2014 at 11:16PM
07/09/2014 at 10:50PM
08/08/2014 at 02:35AM
08/11/2014 at 10:41AM
09/24/2014 at 10:22PM
10/03/2014 at 07:46PM
12/05/2014 at 05:36PM
03/03/2015 at 10:03AM
04/26/2015 at 05:07AM
05/26/2015 at 10:03PM
06/09/2015 at 07:48PM
07/06/2015 at 10:54PM
07/20/2015 at 08:50PM
07/24/2015 at 09:48AM
09/14/2015 at 05:19AM
07/18/2016 at 02:33PM