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

673 active golfers, 2014 entries

Leaderboard (lowest score wins):
13
#31 - Ivan Brennan / @ivanbrennan

05/28/2014 at 02:24AM

13
#32 - Teodor Kotov / @Microfed

05/28/2014 at 10:00PM

13
#33 - Marcin Sza / @coot_

05/30/2014 at 10:43AM

13
#34 - Nick Chambers / @fatnickc

05/30/2014 at 07:29PM

13
#35 - Kris Hom / @krishom

05/30/2014 at 08:36PM

13
#36 - Vim Dude / @vim_dude

05/30/2014 at 09:00PM

13
#37 - Alex Tercete / @alextercete

05/31/2014 at 01:36PM

13
#38 - Duke Vladimir / @semitchev

06/03/2014 at 04:23AM

13
#39 - Jean-Marie Comets / @jmcomets

06/03/2014 at 03:21PM

13
#40 - Julian Priestley / @Juzley

06/03/2014 at 04:32PM

13
#41 - Andy Novocin / @AndyNovocin

06/05/2014 at 04:20AM

13
#42 - wes / @_weslly

06/06/2014 at 09:34PM

13
#43 - Jonas Arnold Clasen / @jonasclasen

06/06/2014 at 09:52PM

13
#44 - Robert Bruce / @therealrobru

06/08/2014 at 03:28AM

13
#45 - buz / @buzbone

06/12/2014 at 12:49PM

13
#46 - Evgeniy Veretennikov / @evg_veret

06/13/2014 at 03:09PM

13
#47 - Tobias Brixen / @brixendk

06/13/2014 at 05:20PM

13
#48 - Ole Hansen / @0hansen

06/14/2014 at 01:58PM

13
#49 - Sntano Euhsk / @SEuhsk

06/15/2014 at 12:51AM

13
#50 - Bart / @oneofmanybarts

06/16/2014 at 07:08AM

13
#51 - typp / @tehtyppz

06/16/2014 at 12:23PM

13
#52 - Tyler Holien / @tylerholien

06/17/2014 at 02:56PM

13
#53 - Edric Garran / @edric_garran

06/17/2014 at 09:55PM

13
#54 - Timothy Chong / @timothychongg

06/20/2014 at 06:45PM

13
#55 - Javier Blanco / @jbgutierrez

06/23/2014 at 08:41AM

13
#56 - John Meisner / @jmeisned

06/24/2014 at 04:09AM

13
#57 - jackliusr / @jackliusr

06/28/2014 at 01:26PM

13
#58 - Jacob Joaquin / @JacobJoaquin

07/01/2014 at 04:06AM

13
#59 - trotha01 / @trotha01

07/01/2014 at 04:34AM

13
#60 - Adam G / @gougerz

07/04/2014 at 07:44PM