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
759 remaining solutions by
signing in and submitting your own entry
#760
BitLad / @BitLad -
Score: 30 -
01/31/18 @ 18:37
veeeexo<Esc>paf)<Esc>kIf=<Esc>A;<Esc>hx:w<CR>:wq<CR>
0 comments
760 active golfers, 2379 entries
Leaderboard (lowest score wins):
12/17/2020 at 06:52PM
07/30/2021 at 01:06AM
09/28/2021 at 01:24PM
02/04/2023 at 01:49PM
04/25/2023 at 12:29PM
07/10/2023 at 02:16AM
09/26/2023 at 10:04AM
12/12/2023 at 08:45AM
06/30/2025 at 11:57PM
05/09/2014 at 04:00PM
05/09/2014 at 05:32PM
05/09/2014 at 08:33PM
05/09/2014 at 09:01PM
05/09/2014 at 09:12PM
05/10/2014 at 07:52AM
05/10/2014 at 07:35PM
05/11/2014 at 04:25PM
05/16/2014 at 07:54AM
05/22/2014 at 02:56PM
05/24/2014 at 12:18PM
05/27/2014 at 03:26PM
05/30/2014 at 07:34AM
06/02/2014 at 09:36PM
06/05/2014 at 10:36PM
06/07/2014 at 01:30PM
06/12/2014 at 07:37PM
06/14/2014 at 05:46PM
06/16/2014 at 06:56PM
06/28/2014 at 01:58AM
07/15/2014 at 02:57AM