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

647 active golfers, 1928 entries

Leaderboard (lowest score wins):
16
#391 - john / @KMKY_Aha

05/11/2014 at 01:59PM

16
#392 - Ricardo M. Vilchis / @ajkaanbal

05/12/2014 at 04:34AM

16
#393 - Pedro Santos / @pedrosans

05/13/2014 at 10:19PM

16
#394 - 土ヤ / @ttsuchiya

05/13/2014 at 11:49PM

16
#395 - Felipe Jaramillo F / @mrfelipe

05/14/2014 at 04:33AM

16
#396 - Mick Garvey / @blarko

05/14/2014 at 09:22PM

16
#397 - Heron Medeiros / @heronmedeiros

05/14/2014 at 10:57PM

16
#398 - captain_morgan / @captain_morgan

05/20/2014 at 02:08AM

16
#399 - Mike Ballou / @ballou88

05/28/2014 at 04:27PM

16
#400 - Jake Eaton / @Jake__Eaton

06/01/2014 at 05:06AM

16
#401 - Subhi Dweik / @SubhiDweik

06/02/2014 at 11:12PM

16
#402 - MaienM / @MaienM

06/03/2014 at 01:21AM

16
#403 - Alan Sherman / @InfoLeak117

06/03/2014 at 06:53PM

16
#404 - Andrew Hyatt / @andrewhyatt

06/07/2014 at 04:09AM

16
#405 - Brian / @wyantb_reader

06/26/2014 at 01:53AM

16
#406 - Jonathan Skeate / @jskeate

06/30/2014 at 09:20PM

16
#407 - Tim Vim / @vim_tim

07/01/2014 at 09:49AM

16
#408 - Robert Siemieniec / @rsiemieniec

07/07/2014 at 12:28PM

16
#409 - michael whitehead / @whitehead1415

07/08/2014 at 08:35PM

16
#410 - yamasita taisuke / @yaasita

07/11/2014 at 04:06PM

16
#411 - w1zeman1p / @wizemanip

07/11/2014 at 06:27PM

16
#412 - Vim Golfer / @thevimgolfer

07/13/2014 at 10:31AM

16
#413 - RiccardoSven Risuleo / @riccardosven

07/16/2014 at 08:44PM

16
#414 - Almog / @almog

07/27/2014 at 01:16PM

16
#415 - Yariv / @yarivb

07/27/2014 at 01:30PM

16
#416 - Marco Biasini / @biasmv

07/28/2014 at 08:31PM

16
#417 - Florian Lücke / @CannibalGorilla

08/10/2014 at 12:04PM

16
#418 - Miles Edland / @ShutUpMiles

08/19/2014 at 03:01AM

16
#419 - Harald H / @metellius

08/19/2014 at 09:10PM

16
#420 - Mike Rayner / @mikesfake

08/23/2014 at 04:11PM