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
756 remaining solutions by
signing in and submitting your own entry
#757
BitLad / @BitLad -
Score: 30 -
01/31/18 @ 18:37
veeeexo<Esc>paf)<Esc>kIf=<Esc>A;<Esc>hx:w<CR>:wq<CR>
0 comments
757 active golfers, 2372 entries
Leaderboard (lowest score wins):
05/06/2016 at 02:02AM
06/02/2016 at 08:53AM
06/24/2016 at 10:35PM
08/10/2016 at 09:52PM
08/18/2016 at 10:57PM
09/09/2016 at 06:55PM
11/02/2016 at 05:51PM
12/21/2016 at 09:25AM
03/17/2017 at 01:17PM
04/10/2017 at 11:59AM
05/05/2017 at 01:20AM
05/12/2017 at 03:24PM
06/17/2017 at 11:55AM
02/03/2019 at 08:48PM
02/12/2019 at 05:21AM
05/16/2019 at 06:59AM
12/23/2019 at 12:47PM
09/26/2020 at 12:27AM
12/30/2023 at 07:55AM
05/10/2014 at 09:42PM
05/11/2014 at 01:59PM
05/12/2014 at 04:34AM
05/13/2014 at 10:19PM
05/13/2014 at 11:49PM
05/14/2014 at 04:33AM
05/14/2014 at 09:22PM
05/14/2014 at 10:57PM
05/20/2014 at 02:08AM
05/28/2014 at 04:27PM
06/01/2014 at 05:06AM