Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 536cfa23fcccd100025678bd

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)

View Diff

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 672 remaining solutions by signing in and submitting your own entry
#673 BitLad / @BitLad - Score: 30 - 01/31/18 @ 18:37
veeeexo<Esc>paf)<Esc>kIf=<Esc>A;<Esc>hx:w<CR>:wq<CR>

0 comments


Created by: @EdgarHipp

673 active golfers, 2014 entries

Leaderboard (lowest score wins):
19
#601 - Yuan Guan / @yuanguan89

03/03/2015 at 10:03AM

19
#602 - chvzvhn / @chvzvhn

04/26/2015 at 05:07AM

19
#603 - Personal Life Trackr / @PersLifeTrackr

05/26/2015 at 10:03PM

19
#604 - Hervé Rouault / @hrouault

06/09/2015 at 07:48PM

19
#605 - Shizukesa / @Shizukesa

07/06/2015 at 10:54PM

19
#606 - Samir Sadek / @netsamir

07/20/2015 at 08:50PM

19
#607 - darookee / @darookee

07/24/2015 at 09:48AM

19
#608 - Ben Vandervalk / @benvvalk

09/14/2015 at 05:19AM

19
#609 - Dan Madden / @guthran

07/18/2016 at 02:33PM

19
#610 - Andreas Anderbach / @anderbacha

03/21/2017 at 04:58PM

19
#611 - caplod / @caplod

03/25/2017 at 03:08PM

19
#612 - Geoff / @RealGeoffErwin

10/09/2017 at 06:58PM

19
#613 - Austin Ware / @AustinWare17

03/12/2018 at 08:51PM

19
#614 - niwatoco / @yoshitune9

07/19/2018 at 07:50PM

19
#615 - Random / @Random29985999

11/29/2018 at 03:50PM

19
#616 - Graham Singer / @grahamsinger

01/05/2019 at 05:25AM

20
#617 - Joseph Tyler Jones / @josephtyler

05/12/2014 at 10:13PM

20
#618 - Jan Wedekind / @wedesoft

06/03/2014 at 09:46PM

20
#619 - Pablo Acuña R. / @pabloacunar

06/22/2014 at 11:46PM

20
#620 - Akshay Aurora / @akshayaurora

09/16/2014 at 07:40AM

20
#621 - Edmundo Perez / @ingedmundo

12/03/2014 at 07:13PM

20
#622 - Maxime / @Maxime_VII

06/23/2015 at 02:45PM

20
#623 - かりうむ / @ka1l

12/07/2015 at 04:09AM

20
#624 - Thijs van den Anker / @thijsvdanker

02/21/2016 at 08:37AM

20
#625 - Ryan van Rensburg / @rdvr001

07/21/2016 at 10:29AM

20
#626 - Kaydo Alders / @Yousousen

03/13/2018 at 05:26PM

20
#627 - Andrew Ouzts / @andrew_ouzts

07/22/2018 at 05:12AM

20
#628 - Benjamin Kiesl / @BenjaminKiesl

11/05/2018 at 01:57PM

20
#629 - Sebastien Nicoud / @sebnukem

02/04/2019 at 01:40AM

20
#630 - Michaël Lévesque-Dion / @mlevesquedion

04/25/2019 at 09:42PM