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

624 active golfers, 1837 entries

Leaderboard (lowest score wins):
13
#211 - Roger Bongers / @RogerBongers

10/07/2018 at 05:57PM

13
#212 - Dax / @zacoxi

11/09/2018 at 06:33AM

13
#213 - i33 / @i3342th

11/14/2018 at 08:24AM

13
#214 - name / @name65894813

11/19/2018 at 04:46PM

13
#215 - faisal / @faisalhackshah

11/26/2018 at 05:26AM

13
#216 - band / @band26376522

12/08/2018 at 11:06PM

13
#217 - 14758f1afd44c09b7992073ccf00b43d / @14758f1afd44c01

12/18/2018 at 08:37PM

13
#218 - Bennett / @bennettbackward

12/19/2018 at 12:42PM

13
#219 - Dan Yeaw / @danyeaw

01/13/2019 at 02:02AM

14
#220 - Kai Yuan / @kentyuan

05/09/2014 at 04:48PM

14
#221 - Carlos López / @morrizon

05/09/2014 at 07:21PM

14
#222 - Arthur叔 / @Arthurljg

05/10/2014 at 04:32AM

14
#223 - RobertT / @techrt2050

05/11/2014 at 05:08AM

14
#224 - Richard Veneracion / @rveneracion

05/11/2014 at 07:22AM

14
#225 - Bambu / @bambumandinga

05/11/2014 at 08:05PM

14
#226 - nikola chochkov / @gooodini

05/14/2014 at 09:47AM

14
#227 - 3X4n5 / @3X4n5

05/15/2014 at 01:48PM

14
#228 - Dave C / @dmlc133

05/15/2014 at 03:11PM

14
#229 - ところたん / @tokoro10g

05/19/2014 at 01:43AM

14
#230 - たかきの / @srtkmsw

05/22/2014 at 09:47AM

14
#231 - Grigoriy Alexeev / @GrigoriyAlexeev

05/24/2014 at 12:34PM

14
#232 - vansan / @VinceVansan

06/02/2014 at 09:16PM

14
#233 - Steffen Siering / @ursobln

06/02/2014 at 11:06PM

14
#234 - Emil Soman / @emilsoman

06/05/2014 at 10:12PM

14
#235 - kwa / @kwa129

06/14/2014 at 07:57AM

14
#236 - Crazy Wizdom / @crazywizdom

06/23/2014 at 09:00PM

14
#237 - ドラゴン井門 / @ido_mazine

06/25/2014 at 08:01AM

14
#238 - James Scriven / @JamesDScriven

07/06/2014 at 01:42PM

14
#239 - Jaron R. Hendrix / @Ronamo

07/08/2014 at 05:27PM

14
#240 - Laura Halla / @laura_halla

07/08/2014 at 08:30PM