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):
17
#511 - Etienne Tremel / @etiennetremel

02/07/2016 at 11:49AM

17
#512 - Pratap Koritala / @pratap_koritala

02/17/2016 at 11:23AM

17
#513 - ɹǝsnɐɥsıʇnɹ uoɾ / @JonRutis

03/01/2016 at 05:40PM

17
#514 - Yahyalexandre33 / @yahyalexandre33

03/16/2016 at 09:29AM

17
#515 - Feras / @faldah

05/01/2016 at 04:16AM

17
#516 - iNaKoll / @iNaKoll

05/07/2016 at 09:39PM

17
#517 - Ben Hill / @KaizenSoze70

05/09/2016 at 04:24PM

17
#518 - Tom / @CronutFacts

05/31/2016 at 02:28AM

17
#519 - Ameen P / @Ameen_P1

06/23/2016 at 05:05PM

17
#520 - Timothy Caleb Nordlo / @tnordloh

06/27/2016 at 11:08PM

17
#521 - Thiago Belem / @TiuTalk

08/31/2016 at 04:11AM

17
#522 - TweetDreams / @TweetMusicians

10/09/2016 at 06:21AM

17
#523 - KangHun Seo / @shirano80

11/18/2016 at 05:40AM

17
#524 - holy_sin / @0zero0

12/16/2016 at 04:52AM

17
#525 - Sam Hammer / @samhammer325

05/06/2017 at 07:38AM

17
#526 - Brandon Height / @Lask0x

08/08/2017 at 03:56AM

17
#527 - Prithviraj Patil / @dummyprithviraj

12/03/2017 at 04:21PM

17
#528 - Di Peng / @DCodier

11/01/2018 at 10:30PM

18
#529 - Benjamin Williams / @benjaminjosephw

05/09/2014 at 04:24PM

18
#530 - Łukasz Makuch / @zopsesen

05/18/2014 at 03:47PM

18
#531 - debris / @iDebris5

05/18/2014 at 03:51PM

18
#532 - tobeportable / @tobeportable

05/22/2014 at 02:52PM

18
#533 - Ilya Strukov / @i1ey

05/23/2014 at 11:42AM

18
#534 - TimWolla / @TimWolla

06/02/2014 at 11:06PM

18
#535 - Nelson Senna / @nelson_senna

06/03/2014 at 03:21PM

18
#536 - Mayor Guelph / @RogerGuelph

06/11/2014 at 02:03AM

18
#537 - Martijn Theunissen / @Damnesia__

06/12/2014 at 11:37PM

18
#538 - uncleringo / @uncleringo

07/02/2014 at 08:34AM

18
#539 - madka / @lachrimae_pavan

08/03/2014 at 04:36PM

18
#540 - Adrian Bradd / @keepab

09/01/2014 at 12:16AM