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
727 remaining solutions by
signing in and submitting your own entry
#728
BitLad / @BitLad -
Score: 30 -
01/31/18 @ 18:37
veeeexo<Esc>paf)<Esc>kIf=<Esc>A;<Esc>hx:w<CR>:wq<CR>
0 comments
728 active golfers, 2215 entries
Leaderboard (lowest score wins):
04/28/2016 at 08:31AM
06/22/2016 at 03:10PM
01/11/2017 at 06:23AM
01/18/2017 at 03:40PM
03/22/2017 at 11:09PM
04/02/2017 at 12:57PM
04/19/2017 at 06:46PM
06/11/2017 at 08:46PM
08/15/2017 at 01:52AM
10/05/2017 at 03:44PM
11/28/2017 at 03:22PM
01/29/2018 at 12:13PM
03/18/2018 at 01:12PM
05/26/2018 at 12:57PM
06/22/2018 at 08:49AM
07/26/2018 at 12:13AM
07/30/2018 at 07:27PM
12/04/2018 at 01:56PM
12/18/2018 at 06:07PM
12/18/2018 at 07:56PM
01/30/2019 at 08:00PM
02/22/2019 at 04:30PM
02/27/2019 at 04:13AM
02/28/2019 at 02:26PM
03/02/2019 at 08:51PM
03/03/2019 at 06:27AM
03/19/2019 at 01:30AM
04/15/2019 at 11:39AM
05/04/2019 at 11:10AM
05/06/2019 at 08:52PM