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

676 active golfers, 2019 entries

Leaderboard (lowest score wins):
16
#481 - 村橋究理基M.Kuriki@北大 / @mkuriki_

08/11/2018 at 12:00PM

16
#482 - Hugo / @szeyattai

08/17/2018 at 08:08AM

16
#483 - Rebecca V. / @rxbxccxv

02/05/2019 at 12:00AM

16
#484 - Groovy / @groovy9

03/08/2019 at 04:46PM

16
#485 - ささ / @nick11033

05/18/2019 at 08:07AM

16
#486 - majo senf / @majo_senf

06/17/2019 at 01:08PM

17
#487 - Brett Cassette / @brettcassette

05/15/2014 at 01:17AM

17
#488 - James / @Dronak

05/15/2014 at 01:43PM

17
#489 - Dmitry Teslenko / @krab_mozga

05/16/2014 at 09:06AM

17
#490 - Phil Pirozhkov / @philpirj

05/17/2014 at 01:15PM

17
#491 - Kyle Travis / @kmakai

05/17/2014 at 08:46PM

17
#492 - Michi Loro / @michiloro

05/19/2014 at 08:42AM

17
#493 - Drew DeVault / @sircmpwn

05/19/2014 at 06:35PM

17
#494 - codegourmet / @codegourmet

05/21/2014 at 11:47AM

17
#495 - Tojo Chacko / @tojochacko

05/26/2014 at 04:27AM

17
#496 - yusukesasaki / @yysaki

06/01/2014 at 01:36PM

17
#497 - Karun Ramakrishnan / @the_karun

06/02/2014 at 03:22AM

17
#498 - Sarah Ransohoff / @sranso

06/03/2014 at 02:00AM

17
#499 - Brian Peck / @bpeck614

06/03/2014 at 03:41PM

17
#500 - James Ryland Miller / @longhornxtreme

06/04/2014 at 08:57PM

17
#501 - Brad DeShong / @braddeshong

06/11/2014 at 01:12AM

17
#502 - Herr Oppermann / @HerrOppermann

06/15/2014 at 02:45PM

17
#503 - Leland Paul Kusmer / @lelandpaul

06/15/2014 at 11:43PM

17
#504 - compiled wrong / @compiledwrong

06/16/2014 at 07:16AM

17
#505 - Darrin McCarthy / @darrinmc

06/21/2014 at 09:03PM

17
#506 - Miguel R. Rubinos / @mrrubinos

06/22/2014 at 07:19PM

17
#507 - Tim Habermaas / @timhabermaas

06/24/2014 at 08:28PM

17
#508 - Mandy Choi / @mundi_c

06/28/2014 at 09:05AM

17
#509 - Kirill / @wedens_

07/09/2014 at 06:06AM

17
#510 - glennphillips / @glennphillips

07/09/2014 at 09:22PM