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

754 active golfers, 2362 entries

Leaderboard (lowest score wins):
13
#1 - Urtica dioica / @udioica

05/09/2014 at 04:35PM

13
#2 - Yann Moisan / @YannMoisan

05/09/2014 at 07:41PM

13
#3 - Tim Chase / @gumnos

05/09/2014 at 08:30PM

13
#4 - zmo / @guyzmo

05/09/2014 at 08:44PM

13
#5 - Akshay Hegde / @ajh_17

05/09/2014 at 10:18PM

13
#6 - xRyanxBrutalityx / @xHainingx

05/10/2014 at 12:25AM

13
#7 - David Barker / @dashleybarker

05/10/2014 at 06:15AM

13
#8 - vimgolf copycat / @vimgolf_copycat

05/10/2014 at 11:10AM

13
#9 - Marcin Mucha / @marcinmucha

05/10/2014 at 12:49PM

13
#10 - Zapata / @Incredible_JFP

05/10/2014 at 01:56PM

13
#11 - Petro Тrouq / @zulolosi

05/10/2014 at 03:21PM

13
#12 - Chaitanya Desu / @ChaituNu

05/10/2014 at 03:26PM

13
#13 - Anton Dudenkoff / @dudenkoff

05/11/2014 at 09:01AM

13
#14 - Nic West / @west_nic

05/11/2014 at 05:26PM

13
#15 - Strabs / @artistavenue

05/12/2014 at 09:23AM

13
#16 - John Braxler / @braxler

05/12/2014 at 12:14PM

13
#17 - wizardwerdna / @wizardwerdna

05/12/2014 at 04:17PM

13
#18 - Shefaet / @shefaet

05/13/2014 at 01:16AM

13
#19 - Henry Blevins / @HenryBlevins

05/14/2014 at 09:00PM

13
#20 - Pile of Goats / @Hillelogram

05/15/2014 at 01:21AM

13
#21 - Markus Kasper / @KasperBox

05/16/2014 at 06:39PM

13
#22 - Milind Ganjoo / @mganjoo

05/16/2014 at 09:26PM

13
#23 - Aleksander Gajewski / @adgajewski

05/16/2014 at 10:30PM

13
#24 - Felix Stridsberg / @FelixStridsberg

05/18/2014 at 01:22PM

13
#25 - Alex / @ven_y_toma

05/18/2014 at 10:19PM

13
#26 - Partial SHA1 hash / @25fcag9e

05/19/2014 at 04:58PM

13
#27 - Leigh Bicknell / @Elwon20Leigh

05/20/2014 at 07:47PM

13
#28 - Michael Bitzi / @mibitzi

05/20/2014 at 09:19PM

13
#29 - Jiří Chára / @JiriChara

05/22/2014 at 09:10AM

13
#30 - Benoit d'Oncieu / @bdoncieu

05/23/2014 at 05:12PM