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):
11/24/2019 at 06:12PM
12/21/2019 at 11:53PM
01/01/2020 at 05:21PM
01/04/2020 at 01:21PM
01/08/2020 at 03:49AM
03/13/2020 at 07:44AM
03/27/2020 at 05:23PM
05/14/2020 at 02:14PM
05/29/2020 at 02:41AM
07/01/2020 at 03:38PM
12/20/2020 at 03:52AM
01/08/2021 at 09:31PM
01/11/2021 at 04:28PM
01/16/2021 at 07:48PM
05/27/2021 at 06:39AM
05/29/2021 at 03:56PM
07/29/2021 at 11:22PM
11/28/2021 at 05:38PM
12/17/2021 at 05:17AM
02/24/2022 at 04:15PM
05/26/2022 at 02:24AM
07/07/2022 at 11:49PM
09/17/2022 at 02:27PM
09/26/2022 at 06:09AM
09/26/2022 at 08:12AM
09/26/2022 at 09:34PM
10/17/2022 at 09:10PM
04/08/2024 at 12:53AM
05/31/2024 at 09:30AM
07/02/2024 at 01:52AM