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):
07/09/2024 at 07:06AM
07/10/2024 at 03:47PM
08/28/2024 at 05:48PM
01/29/2025 at 04:30AM
05/06/2025 at 02:16AM
05/09/2014 at 04:48PM
05/09/2014 at 07:21PM
05/10/2014 at 04:32AM
05/11/2014 at 05:08AM
05/11/2014 at 07:22AM
05/11/2014 at 08:05PM
05/14/2014 at 09:47AM
05/15/2014 at 01:48PM
05/15/2014 at 03:11PM
05/19/2014 at 01:43AM
05/22/2014 at 09:47AM
05/24/2014 at 12:34PM
06/02/2014 at 09:16PM
06/02/2014 at 11:06PM
06/05/2014 at 10:12PM
06/14/2014 at 07:57AM
06/23/2014 at 09:00PM
06/25/2014 at 08:01AM
07/06/2014 at 01:42PM
07/08/2014 at 05:27PM
07/08/2014 at 08:30PM
07/18/2014 at 03:13AM
07/20/2014 at 02:36AM
07/20/2014 at 07:12PM
07/21/2014 at 12:24PM