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):
05/26/2019 at 03:23PM
05/18/2014 at 10:10AM
06/15/2014 at 04:34PM
06/22/2014 at 05:58PM
07/17/2014 at 01:08PM
08/25/2014 at 03:19PM
11/25/2014 at 12:31AM
01/01/2015 at 02:28AM
#699 - Dr Rev J. “I am not a bot!” Kirchartz, KSC, KHS / @JKirchartz
01/16/2015 at 04:15AM
03/15/2015 at 07:00PM
05/07/2015 at 08:08PM
10/05/2015 at 07:00PM
12/18/2015 at 09:23PM
04/25/2016 at 07:43AM
01/22/2019 at 01:34PM
04/05/2019 at 09:28AM
12/03/2014 at 03:47PM
12/18/2018 at 03:34AM
09/03/2019 at 10:10PM
#710 - kafang plays vimgolf / @KafangV
12/18/2020 at 04:38AM
06/01/2014 at 12:55PM
08/14/2014 at 06:39PM
09/17/2014 at 07:12AM
09/27/2014 at 08:38AM
08/22/2019 at 12:11PM
02/21/2021 at 06:04AM
05/29/2014 at 04:06AM
07/11/2014 at 11:10PM
10/01/2014 at 05:45PM
03/29/2015 at 02:35AM