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

700 active golfers, 2106 entries

Leaderboard (lowest score wins):
14
#331 - 赤佐田奈葉 / @akasatanaha_

06/22/2018 at 08:49AM

14
#332 - qed / @qed13308565

07/26/2018 at 12:13AM

14
#333 - Rajesh Sharma / @deepredsky

07/30/2018 at 07:27PM

14
#334 - Mihai / @mihaicristiant

12/04/2018 at 01:56PM

14
#335 - Timothy Michael Fox / @Timothy_M_Fox

12/18/2018 at 06:07PM

14
#336 - Bob_V / @Bob_V

12/18/2018 at 07:56PM

14
#337 - Patrick Lavin / @LavinComputes

01/30/2019 at 08:00PM

14
#338 - Timothy Bryan / @tim_bryan

02/22/2019 at 04:30PM

14
#339 - Zach Miller / @barizachsy

02/27/2019 at 04:13AM

14
#340 - Maarten Staa / @SeriousSpoon

02/28/2019 at 02:26PM

14
#341 - ahm4711 / @ahm4711

03/02/2019 at 08:51PM

14
#342 - andrwyoung / @andrwyoung1

03/03/2019 at 06:27AM

14
#343 - ui / @ui61065627

03/19/2019 at 01:30AM

14
#344 - alekfed / @alek_fed

04/15/2019 at 11:39AM

14
#345 - Gitsnik / @dracyrys

05/04/2019 at 11:10AM

14
#346 - Nils Moehrle / @MoehrleNils

05/06/2019 at 08:52PM

14
#347 - Arno / @arnoxmp

05/08/2019 at 08:48PM

14
#348 - Phoon / @justflashhim

05/10/2019 at 10:39PM

14
#349 - albalitz / @_albalitz

06/06/2019 at 01:01PM

14
#350 - José / @AngelGaldamez

08/31/2019 at 06:00AM

14
#351 - monaqa / @mo_naqa

09/16/2019 at 10:29AM

14
#352 - Baine Wedlock / @BaineWedlock

09/24/2019 at 12:44PM

14
#353 - Lory / @Lory46845742

11/13/2019 at 09:04AM

14
#354 - Jason Neylon / @jasonneylon

02/23/2020 at 10:42AM

14
#355 - 薛浩滎 / @iTPChbTeI4ZW9s3

03/17/2020 at 10:41PM

14
#356 - floyd / @floyd10086

03/27/2020 at 07:21AM

14
#357 - eshel / @EshelBM

03/29/2020 at 06:29PM

15
#358 - Edgar Hipp / @EdgarHipp

05/09/2014 at 04:00PM

15
#359 - Jeff Parent / @jeffparent

05/09/2014 at 05:32PM

15
#360 - lastsseldon / @lastsseldon

05/09/2014 at 08:33PM