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):
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
05/09/2014 at 04:24PM
05/18/2014 at 03:47PM
05/18/2014 at 03:51PM
05/22/2014 at 02:52PM
05/23/2014 at 11:42AM
06/02/2014 at 11:06PM
06/03/2014 at 03:21PM
06/11/2014 at 02:03AM
06/12/2014 at 11:37PM
07/02/2014 at 08:34AM
08/03/2014 at 04:36PM
09/01/2014 at 12:16AM
09/01/2014 at 01:30PM
03/16/2015 at 02:38PM
03/25/2015 at 01:56PM
11/13/2015 at 01:57AM
06/21/2016 at 09:56AM
02/22/2017 at 02:17AM
10/15/2017 at 07:37AM
11/01/2017 at 07:52PM