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):
17
#481 - Drew DeVault / @sircmpwn

05/19/2014 at 06:35PM

17
#482 - codegourmet / @codegourmet

05/21/2014 at 11:47AM

17
#483 - Tojo Chacko / @tojochacko

05/26/2014 at 04:27AM

17
#484 - yusukesasaki / @yysaki

06/01/2014 at 01:36PM

17
#485 - Karun Ramakrishnan / @the_karun

06/02/2014 at 03:22AM

17
#486 - Sarah Ransohoff / @sranso

06/03/2014 at 02:00AM

17
#487 - Brian Peck / @bpeck614

06/03/2014 at 03:41PM

17
#488 - James Ryland Miller / @longhornxtreme

06/04/2014 at 08:57PM

17
#489 - Brad DeShong / @braddeshong

06/11/2014 at 01:12AM

17
#490 - Herr Oppermann / @HerrOppermann

06/15/2014 at 02:45PM

17
#491 - Leland Paul Kusmer / @lelandpaul

06/15/2014 at 11:43PM

17
#492 - compiled wrong / @compiledwrong

06/16/2014 at 07:16AM

17
#493 - Darrin McCarthy / @darrinmc

06/21/2014 at 09:03PM

17
#494 - Miguel R. Rubinos / @mrrubinos

06/22/2014 at 07:19PM

17
#495 - Tim Habermaas / @timhabermaas

06/24/2014 at 08:28PM

17
#496 - Mandy Choi / @mundi_c

06/28/2014 at 09:05AM

17
#497 - Kirill / @wedens_

07/09/2014 at 06:06AM

17
#498 - glennphillips / @glennphillips

07/09/2014 at 09:22PM

17
#499 - Paul Rodgers / @oursjaune

07/13/2014 at 02:31PM

17
#500 - HellBentSouthernGent / @ChiefThis

07/24/2014 at 06:07AM

17
#501 - Paul Axe / @Paul_Axe

07/29/2014 at 11:40AM

17
#502 - Duncan Parkinson / @duncanparkinson

07/31/2014 at 10:44AM

17
#503 - Patrick Pitoscia / @Patrick03960431

08/03/2014 at 07:14PM

17
#504 - Eric Potter / @pottereric

08/03/2014 at 08:16PM

17
#505 - Bednarik Boldizsar / @bboldi

08/04/2014 at 09:07PM

17
#506 - Blake / @blkbsstt

08/08/2014 at 06:46AM

17
#507 - Tj / @yrddy

08/13/2014 at 05:32AM

17
#508 - Alexey Permyakov / @AlexeyPermyakov

08/24/2014 at 11:42AM

17
#509 - John Doe / @JohnDoeAtLarge

08/26/2014 at 10:21PM

17
#510 - Kristof Vannotten / @kristofv

09/08/2014 at 07:07PM