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

661 active golfers, 1975 entries

Leaderboard (lowest score wins):
16
#421 - Vim Golfer / @thevimgolfer

07/13/2014 at 10:31AM

16
#422 - RiccardoSven Risuleo / @riccardosven

07/16/2014 at 08:44PM

16
#423 - Almog / @almog

07/27/2014 at 01:16PM

16
#424 - Yariv / @yarivb

07/27/2014 at 01:30PM

16
#425 - Marco Biasini / @biasmv

07/28/2014 at 08:31PM

16
#426 - Florian Lücke / @CannibalGorilla

08/10/2014 at 12:04PM

16
#427 - Miles Edland / @ShutUpMiles

08/19/2014 at 03:01AM

16
#428 - Harald H / @metellius

08/19/2014 at 09:10PM

16
#429 - Mike Rayner / @mikesfake

08/23/2014 at 04:11PM

16
#430 - chaffinch / @chaffinch

08/25/2014 at 03:33PM

16
#431 - Dmitriy / @_dpy_

09/03/2014 at 08:00PM

16
#432 - Mattias Fransson / @azzidoos

09/08/2014 at 04:15PM

16
#433 - dfleischman / @dfleischman

09/13/2014 at 06:03AM

16
#434 - Florent F. / @floff01

09/13/2014 at 09:32PM

16
#435 - Antonio De Luna / @Tony_1917

09/24/2014 at 04:43PM

16
#436 - Viktor Lindström / @ViktorLindstr_m

10/04/2014 at 06:43PM

16
#437 - Mateusz Jedrzejewski / @mjedrz

10/22/2014 at 08:05PM

16
#438 - Andy Zhang / @andyzg3

10/23/2014 at 03:07AM

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

10/27/2014 at 06:03AM

16
#440 - kungfuchad / @kungfuchad

10/28/2014 at 07:23PM

16
#441 - Davit Samvelyan / @DavitSamvelyan

11/13/2014 at 02:08PM

16
#442 - Thomas Geßler / @th_gessler

11/17/2014 at 09:10PM

16
#443 - Jan Novak / @odpadnimail

11/19/2014 at 04:07AM

16
#444 - Keyboard Fire / @KeyboardFire

11/22/2014 at 02:12PM

16
#445 - Rao Zvorovski / @RaoZvorovski

12/06/2014 at 07:04PM

16
#446 - Pierre Houssin / @PierreHoussin

12/16/2014 at 08:52PM

16
#447 - SilentFl / @Silent_Fl

01/27/2015 at 07:56AM

16
#448 - Steven Loria / @sloria1

02/15/2015 at 12:09AM

16
#449 - Javier Carpio / @SaxKazein

02/27/2015 at 01:00PM

16
#450 - Kiet Nguyen / @kietnguyen86

03/04/2015 at 10:35AM