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):
17
#481 - Alexey Permyakov / @AlexeyPermyakov

08/24/2014 at 11:42AM

17
#482 - John Doe / @JohnDoeAtLarge

08/26/2014 at 10:21PM

17
#483 - Kristof Vannotten / @kristofv

09/08/2014 at 07:07PM

17
#484 - Christoph Neuroth / @c089

10/18/2014 at 10:00AM

17
#485 - Kongqun Yang / @KongqunY

10/28/2014 at 05:27AM

17
#486 - Steve Lazaridis / @SteveLazaridis

11/03/2014 at 04:31PM

17
#487 - Alex Hioreanu / @hioreanu

11/10/2014 at 04:30AM

17
#488 - John Smith / @temp_soraismus

11/19/2014 at 06:51AM

17
#489 - jared swarts / @JaredSwarts

12/13/2014 at 05:01AM

17
#490 - Wade / @vvandy

12/16/2014 at 06:06AM

17
#491 - Johnny Develop / @johnnydevelop

12/23/2014 at 02:44PM

17
#492 - Russell Ball / @rtball2

01/11/2015 at 03:34PM

17
#493 - Raynard, Jordan / @raynard_jordan

01/14/2015 at 07:09PM

17
#494 - Алексанр Цыганков / @capybarov

02/13/2015 at 03:32PM

17
#495 - Amer / @amerlyq

02/24/2015 at 03:37PM

17
#496 - octotep / @octotep

02/25/2015 at 12:56AM

17
#497 - shugen / @shugeno

03/04/2015 at 09:36PM

17
#498 - Swastik / @__swastik

03/25/2015 at 01:55PM

17
#499 - talineo / @talineo_

04/10/2015 at 11:34PM

17
#500 - Hendrik Lammers / @hendriklammers

04/18/2015 at 06:29PM

17
#501 - Martijn Theunissen / @Martijn_______

04/21/2015 at 07:00PM

17
#502 - Mark Saiget / @MarkSaiget

04/24/2015 at 05:40AM

17
#503 - Zach Morgan / @zpmorgan

05/02/2015 at 10:00AM

17
#504 - Agostino Hernandez / @vimagostino

07/08/2015 at 11:55PM

17
#505 - Barthelemy Dagenais / @bartdag

07/12/2015 at 09:03AM

17
#506 - Albert Pumarola / @AlbertPumarola

08/07/2015 at 03:33PM

17
#507 - Kirill Cherkashin / @kirjs

09/15/2015 at 02:30PM

17
#508 - Mark Clay / @dxftfdlz

10/03/2015 at 11:55PM

17
#509 - ハチポケッツ / @8pockets

12/14/2015 at 12:41AM

17
#510 - twenty2twoss / @twenty2twoss

01/20/2016 at 06:29PM