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 693 remaining solutions by signing in and submitting your own entry
#694 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

694 active golfers, 2090 entries

Leaderboard (lowest score wins):
14
#331 - Rajesh Sharma / @deepredsky

07/30/2018 at 07:27PM

14
#332 - Mihai / @mihaicristiant

12/04/2018 at 01:56PM

14
#333 - Timothy Michael Fox / @Timothy_M_Fox

12/18/2018 at 06:07PM

14
#334 - Bob_V / @Bob_V

12/18/2018 at 07:56PM

14
#335 - Patrick Lavin / @LavinComputes

01/30/2019 at 08:00PM

14
#336 - Timothy Bryan / @tim_bryan

02/22/2019 at 04:30PM

14
#337 - Zach Miller / @barizachsy

02/27/2019 at 04:13AM

14
#338 - Maarten Staa / @SeriousSpoon

02/28/2019 at 02:26PM

14
#339 - ahm4711 / @ahm4711

03/02/2019 at 08:51PM

14
#340 - andrwyoung / @andrwyoung1

03/03/2019 at 06:27AM

14
#341 - ui / @ui61065627

03/19/2019 at 01:30AM

14
#342 - alekfed / @alek_fed

04/15/2019 at 11:39AM

14
#343 - Gitsnik / @dracyrys

05/04/2019 at 11:10AM

14
#344 - Nils Moehrle / @MoehrleNils

05/06/2019 at 08:52PM

14
#345 - Arno / @arnoxmp

05/08/2019 at 08:48PM

14
#346 - Phoon / @justflashhim

05/10/2019 at 10:39PM

14
#347 - albalitz / @_albalitz

06/06/2019 at 01:01PM

14
#348 - José / @AngelGaldamez

08/31/2019 at 06:00AM

14
#349 - monaqa / @mo_naqa

09/16/2019 at 10:29AM

14
#350 - Baine Wedlock / @BaineWedlock

09/24/2019 at 12:44PM

14
#351 - Lory / @Lory46845742

11/13/2019 at 09:04AM

15
#352 - Edgar Hipp / @EdgarHipp

05/09/2014 at 04:00PM

15
#353 - Jeff Parent / @jeffparent

05/09/2014 at 05:32PM

15
#354 - lastsseldon / @lastsseldon

05/09/2014 at 08:33PM

15
#355 - Gwilym Kuiper / @gwilymk

05/09/2014 at 09:01PM

15
#356 - daveseibert / @daveseibert

05/09/2014 at 09:12PM

15
#357 - ryk / @rykarn

05/10/2014 at 07:52AM

15
#358 - Matt Walker / @_walkermatt

05/10/2014 at 07:35PM

15
#359 - Par Narvi / @ParNarvi

05/11/2014 at 04:25PM

15
#360 - mnx / @mnxx

05/16/2014 at 07:54AM