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):
16
#481 - Alan Sherman / @InfoLeak117

06/03/2014 at 06:53PM

16
#482 - Andrew Hyatt / @andrewhyatt

06/07/2014 at 04:09AM

16
#483 - Brian / @wyantb_reader

06/26/2014 at 01:53AM

16
#484 - Jonathan Skeate / @jskeate

06/30/2014 at 09:20PM

16
#485 - Tim Vim / @vim_tim

07/01/2014 at 09:49AM

16
#486 - Robert Siemieniec / @rsiemieniec

07/07/2014 at 12:28PM

16
#487 - michael whitehead / @whitehead1415

07/08/2014 at 08:35PM

16
#488 - yamasita taisuke / @yaasita

07/11/2014 at 04:06PM

16
#489 - CJ Avilla / @cjav_dev

07/11/2014 at 06:27PM

16
#490 - Vim Golfer / @thevimgolfer

07/13/2014 at 10:31AM

16
#491 - RiccardoSven Risuleo / @riccardosven

07/16/2014 at 08:44PM

16
#492 - Almog / @almog

07/27/2014 at 01:16PM

16
#493 - Yariv / @yarivb

07/27/2014 at 01:30PM

16
#494 - Marco Biasini / @biasmv

07/28/2014 at 08:31PM

16
#495 - Florian Lücke / @CannibalGorilla

08/10/2014 at 12:04PM

16
#496 - Miles Edland / @ShutUpMiles

08/19/2014 at 03:01AM

16
#497 - Harald H / @metellius

08/19/2014 at 09:10PM

16
#498 - Mike Rayner / @mikesfake

08/23/2014 at 04:11PM

16
#499 - chaffinch / @chaffinch

08/25/2014 at 03:33PM

16
#500 - Dmitriy / @_dpy_

09/03/2014 at 08:00PM

16
#501 - Mattias Fransson / @azzidoos

09/08/2014 at 04:15PM

16
#502 - dfleischman / @dfleischman

09/13/2014 at 06:03AM

16
#503 - Florent F. / @floff01

09/13/2014 at 09:32PM

16
#504 - Antonio De Luna / @Tony_1917

09/24/2014 at 04:43PM

16
#505 - Viktor Lindström / @ViktorLindstr_m

10/04/2014 at 06:43PM

16
#506 - Mateusz Jedrzejewski / @mjedrz

10/22/2014 at 08:05PM

16
#507 - Andy Zhang / @andyzg3

10/23/2014 at 03:07AM

16
#508 - ЕвгенийВ / @imater

10/27/2014 at 06:03AM

16
#509 - kungfuchad / @kungfuchad

10/28/2014 at 07:23PM

16
#510 - Davit Samvelyan / @DavitSamvelyan

11/13/2014 at 02:08PM