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

755 active golfers, 2364 entries

Leaderboard (lowest score wins):
14
#331 - Louis Burke / @LambdaABeta

07/07/2015 at 07:25PM

14
#332 - Dan Piponi / @sigfpe

07/21/2015 at 07:19PM

14
#333 - Peter B / @l0wm4x

08/12/2015 at 06:55PM

14
#334 - Blake Tereau / @BlakeTereau

08/17/2015 at 09:27PM

14
#335 - LC / @leeren

08/23/2015 at 12:09AM

14
#336 - Jon Nyman / @NymanJon

09/12/2015 at 10:31AM

14
#337 - Bogumił Kamiński / @BogumilKaminski

10/26/2015 at 03:52PM

14
#338 - Marty Boren / @beanmaximalist

11/29/2015 at 01:04AM

14
#339 - Sean Stout / @s183s657

12/10/2015 at 04:05AM

14
#340 - "Smylers" / @Smylers2

02/11/2016 at 11:32AM

14
#341 - antew / @antewcode

03/01/2016 at 02:58PM

14
#342 - Chenut Ludovic / @7Brwa7

03/31/2016 at 10:06AM

14
#343 - Louis Caruana / @louiecaruana

04/23/2016 at 04:06AM

14
#344 - ghajkl vbehj / @cpktnwt311

04/28/2016 at 08:31AM

14
#345 - Ram Tamtam / @ramtamtamtam

06/22/2016 at 03:10PM

14
#346 - Hans Yelek / @hans_yelek

01/11/2017 at 06:23AM

14
#347 - J. Cosa / @esoesotracosa

01/18/2017 at 03:40PM

14
#348 - Reinaldo Astudillo / @astudillor

03/22/2017 at 11:09PM

14
#349 - Solomon / @Trugbildjaeger

04/02/2017 at 12:57PM

14
#350 - Alex Linden / @alexwlinden1

04/19/2017 at 06:46PM

14
#351 - Carl Egbert / @CarlOEgbert

06/11/2017 at 08:46PM

14
#352 - Adam Kożuch / @adamkozuch

08/15/2017 at 01:52AM

14
#353 - Brian Hall / @_bruab_

10/05/2017 at 03:44PM

14
#354 - Luke Bryant / @LukeBryant55

11/28/2017 at 03:22PM

14
#355 - John C Shea / @MHSSachems

01/29/2018 at 12:13PM

14
#356 - Lisa Ugray / @lisa_ugray

03/18/2018 at 01:12PM

14
#357 - Jonathan Camilleri / @Too_Many_Taken

05/26/2018 at 12:57PM

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

06/22/2018 at 08:49AM

14
#359 - qed / @qed13308565

07/26/2018 at 12:13AM

14
#360 - Rajesh Sharma / @deepredsky

07/30/2018 at 07:27PM