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):
13
#91 - Johannes H. / @neVexa

09/22/2014 at 07:37PM

13
#92 - Jakob / @jajob

09/30/2014 at 07:37PM

13
#93 - Chris Trotman / @solarnz

10/06/2014 at 01:42AM

13
#94 - Daniel Burnett / @mango_cheetah

10/10/2014 at 03:16AM

13
#95 - Daniel Pham / @dany_pham

10/12/2014 at 02:51AM

13
#96 - E Both / @enboth

10/16/2014 at 08:24PM

13
#97 - Andreas Simon / @ndrssmn

10/18/2014 at 04:15PM

13
#98 - R / @7vies

10/21/2014 at 04:13AM

13
#99 - Dane Summers / @dsummersl

11/06/2014 at 08:28PM

13
#100 - Marcelo Montu / @_mMontu_

11/17/2014 at 04:32PM

13
#101 - Yuriy / @skriyka

11/20/2014 at 09:17PM

13
#102 - Abdo Achkar / @Achkar

12/04/2014 at 11:12PM

13
#103 - Roberto Alegro / @robertoaall

12/08/2014 at 06:21PM

13
#104 - Eric Lawless / @eplawless

12/11/2014 at 08:54AM

13
#105 - david hu / @chin33z

12/17/2014 at 03:21PM

13
#106 - Andrew Leung / @aleungpivotal

12/22/2014 at 04:25PM

13
#107 - kimber gonzalez / @kimberlycreates

01/08/2015 at 02:54PM

13
#108 - Zull Full / @Zullfull

01/10/2015 at 06:38PM

13
#109 - Andrew / @akxlr

01/15/2015 at 11:26AM

13
#110 - kobby / @_kafdot_

01/18/2015 at 07:07PM

13
#111 - Michael Giuffrida / @mgiuffrida

02/22/2015 at 05:37AM

13
#112 - Darth Shuvalov / @shuvalov_anton

02/25/2015 at 10:33PM

13
#113 - Ben Plantinga / @benplantinga

03/04/2015 at 08:28AM

13
#114 - DrHobo / @_DrHobo_

03/11/2015 at 02:01AM

13
#115 - Garrett Smith / @garrettwhsmith

03/29/2015 at 04:42PM

13
#116 - Alexander Kazakov / @volandkot

03/29/2015 at 07:46PM

13
#117 - Bradley Hardy / @bradleyishardy

04/12/2015 at 09:24PM

13
#118 - Charles Joachim / @cacplate

04/18/2015 at 03:07PM

13
#119 - Andreas Carben / @meiner_eins

04/26/2015 at 12:51PM

13
#120 - Rui Mendes / @rcm_dium

05/02/2015 at 02:26PM