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
728 remaining solutions by
signing in and submitting your own entry
#729
BitLad / @BitLad -
Score: 30 -
01/31/18 @ 18:37
veeeexo<Esc>paf)<Esc>kIf=<Esc>A;<Esc>hx:w<CR>:wq<CR>
0 comments
729 active golfers, 2218 entries
Leaderboard (lowest score wins):
03/21/2017 at 04:58PM
03/25/2017 at 03:08PM
10/09/2017 at 06:58PM
03/12/2018 at 08:51PM
07/19/2018 at 07:50PM
11/29/2018 at 03:50PM
01/05/2019 at 05:25AM
05/12/2014 at 10:13PM
06/03/2014 at 09:46PM
06/22/2014 at 11:46PM
09/16/2014 at 07:40AM
12/03/2014 at 07:13PM
06/23/2015 at 02:45PM
12/07/2015 at 04:09AM
02/21/2016 at 08:37AM
07/21/2016 at 10:29AM
03/13/2018 at 05:26PM
07/22/2018 at 05:12AM
11/05/2018 at 01:57PM
02/04/2019 at 01:40AM
04/25/2019 at 09:42PM
06/01/2014 at 08:38AM
11/16/2014 at 07:47PM
11/17/2014 at 10:18AM
11/26/2014 at 02:58AM
01/23/2015 at 12:30AM
06/09/2015 at 10:47AM
07/06/2017 at 12:09PM
01/26/2019 at 04:42AM
04/05/2019 at 12:43AM