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
772 remaining solutions by
signing in and submitting your own entry
#773
BitLad / @BitLad -
Score: 30 -
01/31/18 @ 18:37
veeeexo<Esc>paf)<Esc>kIf=<Esc>A;<Esc>hx:w<CR>:wq<CR>
0 comments
773 active golfers, 2429 entries
Leaderboard (lowest score wins):
02/07/2016 at 11:49AM
02/17/2016 at 11:23AM
03/01/2016 at 05:40PM
03/16/2016 at 09:29AM
05/01/2016 at 04:16AM
05/07/2016 at 09:39PM
05/09/2016 at 04:24PM
05/31/2016 at 02:28AM
06/23/2016 at 05:05PM
06/27/2016 at 11:08PM
08/31/2016 at 04:11AM
10/09/2016 at 06:21AM
11/18/2016 at 05:40AM
12/16/2016 at 04:52AM
05/06/2017 at 07:38AM
08/08/2017 at 03:56AM
12/03/2017 at 04:21PM
11/01/2018 at 10:30PM
02/09/2019 at 05:00PM
03/03/2019 at 06:09PM
04/22/2019 at 04:14PM
01/23/2020 at 04:59PM
07/31/2020 at 02:04PM
09/03/2020 at 04:33AM
06/15/2023 at 12:04PM
05/20/2024 at 11:50AM
04/20/2026 at 05:34PM
05/09/2014 at 04:24PM
05/18/2014 at 03:47PM
05/18/2014 at 03:51PM