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

661 active golfers, 1975 entries

Leaderboard (lowest score wins):
14
#241 - vansan / @VinceVansan

06/02/2014 at 09:16PM

14
#242 - Steffen Siering / @ursobln

06/02/2014 at 11:06PM

14
#243 - Emil Soman / @emilsoman

06/05/2014 at 10:12PM

14
#244 - kwa / @kwa129

06/14/2014 at 07:57AM

14
#245 - Crazy Wizdom / @crazywizdom

06/23/2014 at 09:00PM

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

06/25/2014 at 08:01AM

14
#247 - James Scriven / @JamesDScriven

07/06/2014 at 01:42PM

14
#248 - Jaron R. Hendrix / @Ronamo

07/08/2014 at 05:27PM

14
#249 - Laura Halla / @laura_halla

07/08/2014 at 08:30PM

14
#250 - Remi Bernotavicius / @bobbobbio

07/18/2014 at 03:13AM

14
#251 - Pete Johns / @johnsyweb

07/20/2014 at 02:36AM

14
#252 - Joey Twiddle / @joeytwiddle

07/20/2014 at 07:12PM

14
#253 - Leon Moll / @MeonLoll

07/21/2014 at 12:24PM

14
#254 - Frank Dinoff / @FDinoff

07/25/2014 at 01:53AM

14
#255 - Peter Strawson / @PeterStrawson

08/04/2014 at 02:06AM

14
#256 - PLS / @jaegd

08/05/2014 at 09:55PM

14
#257 - April Gentle / @chen327684096

08/26/2014 at 03:54PM

14
#258 - Michael Comerford / @MComerford1

09/17/2014 at 01:14AM

14
#259 - Bob Davison / @bobd91

09/23/2014 at 08:28PM

14
#260 - simonced / @simonced

09/28/2014 at 03:14AM

14
#261 - Narek / @NarekCat

10/10/2014 at 07:37PM

14
#262 - Eduardo / @earada

10/22/2014 at 03:42PM

14
#263 - Mauro Persano / @fzort

11/15/2014 at 07:39PM

14
#264 - Matthieu Crapet / @mcr05

11/26/2014 at 10:30AM

14
#265 - Test User / @TestUserIgnore

12/04/2014 at 09:50PM

14
#266 - Josu Oyanguren / @josuoyanguren

12/18/2014 at 04:39PM

14
#267 - Filipe Almeida / @filipe_almeida

12/31/2014 at 09:34AM

14
#268 - Carlos A Henríquez Q / @lagunex

01/18/2015 at 06:18PM

14
#269 - mark0829 / @mark0829

01/25/2015 at 01:42PM

14
#270 - no name / @vimgol

01/28/2015 at 06:35PM