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

624 active golfers, 1837 entries

Leaderboard (lowest score wins):
14
#301 - Lisa Ugray / @lisa_ugray

03/18/2018 at 01:12PM

14
#302 - Jonathan Camilleri / @Too_Many_Taken

05/26/2018 at 12:57PM

14
#303 - 赤佐田奈葉 / @akasatanaha_

06/22/2018 at 08:49AM

14
#304 - qed / @qed13308565

07/26/2018 at 12:13AM

14
#305 - Rajesh Sharma / @deepredsky

07/30/2018 at 07:27PM

14
#306 - Mihai / @mihaicristiant

12/04/2018 at 01:56PM

14
#307 - Timothy Michael Fox / @Timothy_M_Fox

12/18/2018 at 06:07PM

14
#308 - Bob_V / @Bob_V

12/18/2018 at 07:56PM

15
#309 - Edgar Hipp / @EdgarHipp

05/09/2014 at 04:00PM

15
#310 - Jeff Parent / @jeffparent

05/09/2014 at 05:32PM

15
#311 - lastsseldon / @lastsseldon

05/09/2014 at 08:33PM

15
#312 - Gwilym Kuiper / @gwilymk

05/09/2014 at 09:01PM

15
#313 - daveseibert / @daveseibert

05/09/2014 at 09:12PM

15
#314 - ryk / @rykarn

05/10/2014 at 07:52AM

15
#315 - Matt Walker / @_walkermatt

05/10/2014 at 07:35PM

15
#316 - Par Narvi / @ParNarvi

05/11/2014 at 04:25PM

15
#317 - mnx / @mnxx

05/16/2014 at 07:54AM

15
#318 - jolka / @jolka19296078

05/22/2014 at 02:56PM

15
#319 - Apostolis Hardalias / @hardalias

05/24/2014 at 12:18PM

15
#320 - Justin Weidner / @justinweidner

05/27/2014 at 03:26PM

15
#321 - Quota / @Quotad

05/30/2014 at 07:34AM

15
#322 - Augusto Pascutti / @augustohp

06/02/2014 at 09:36PM

15
#323 - heron bird / @urzonn1

06/05/2014 at 10:36PM

15
#324 - Russ Adams / @rustushki

06/07/2014 at 01:30PM

15
#325 - Tim Seyschab / @SeyschabTim

06/12/2014 at 07:37PM

15
#326 - Vinicius Souza / @vsouzas

06/14/2014 at 05:46PM

15
#327 - Jeffrey Klein / @jeffwklein

06/16/2014 at 06:56PM

15
#328 - TapTemplate / @TapTemplate

06/28/2014 at 01:58AM

15
#329 - sergio filho / @sergio3010

07/15/2014 at 02:57AM

15
#330 - Joakim Hansen / @gnofs

07/31/2014 at 12:50PM