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
754 remaining solutions by
signing in and submitting your own entry
#755
BitLad / @BitLad -
Score: 30 -
01/31/18 @ 18:37
veeeexo<Esc>paf)<Esc>kIf=<Esc>A;<Esc>hx:w<CR>:wq<CR>
0 comments
755 active golfers, 2364 entries
Leaderboard (lowest score wins):
07/07/2015 at 07:25PM
07/21/2015 at 07:19PM
08/12/2015 at 06:55PM
08/17/2015 at 09:27PM
08/23/2015 at 12:09AM
09/12/2015 at 10:31AM
10/26/2015 at 03:52PM
11/29/2015 at 01:04AM
12/10/2015 at 04:05AM
02/11/2016 at 11:32AM
03/01/2016 at 02:58PM
03/31/2016 at 10:06AM
04/23/2016 at 04:06AM
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