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 53c66c482b4166000226bbee

Don't know what this is

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

Start file
[1:0]
[0:1]
[1:100]
[0:100]
End file
[   ]
[   ]
[     ]
[     ]

View Diff

1,4c1,4
< [1:0]
< [0:1]
< [1:100]
< [0:100]
---
> [   ]
> [   ]
> [     ]
> [     ]

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 481 remaining solutions by signing in and submitting your own entry
#482 luffy / @raxcoi - Score: 75 - 08/01/14 @ 13:29
:<Up><Up><Up>%s/[^\[\]]*/\=repeat()/g<Left><Left><Left><Left><Left><Left><Left><Left><Left><Right><Right><Right><Right><Right><Right><Right><Left>' ', strlen()<Left>submatch(0)<CR>:wq<CR>

0 comments


Created by: @udioica

482 active golfers, 1565 entries

Leaderboard (lowest score wins):
16
#421 - Gerald Tilma / @GeraldTilma

10/17/2015 at 10:56PM

16
#422 - Anshu Avinash / @anshu_avinash

10/18/2015 at 06:08PM

16
#423 - roboguy / @roboguy

10/18/2015 at 10:57PM

16
#424 - Ryan Marcotte / @ryanjmarcotte

11/15/2015 at 05:49PM

16
#425 - Izabel Jelenić / @IzabelJelenic

01/02/2016 at 09:00PM

16
#426 - fuck GFW / @ravishGFW

01/05/2016 at 12:10PM

16
#427 - Etienne Tremel / @etiennetremel

02/06/2016 at 01:49PM

16
#428 - Kevin Gisi / @cheerskevin

02/24/2016 at 08:23AM

16
#429 - ELINGUI Pascal Uriel / @elinguiuriel

04/20/2016 at 12:34PM

16
#430 - Jason Pleau / @JasonPleau

05/06/2016 at 02:14AM

16
#431 - Steven Moazami / @mong8se

05/10/2016 at 01:19AM

16
#432 - Andres Araya / @arayaandresfco

05/15/2016 at 07:59PM

16
#433 - quiggy🌹 / @quiggy

05/18/2016 at 02:20PM

16
#434 - Ameen P / @Ameen_P1

06/23/2016 at 04:59PM

16
#435 - Timothy Caleb Nordlo / @tnordloh

06/30/2016 at 04:03AM

16
#436 - André Peric Tavares / @AndrePeric

07/24/2016 at 05:43PM

16
#437 - 알카포 / @alkpo12

09/09/2016 at 07:46AM

16
#438 - Ian van der Linde / @Ian_vdl

09/16/2016 at 04:16PM

16
#439 - Ilya Ezepov / @iezepov

12/05/2016 at 09:21AM

16
#440 - Colin Jacobs / @coljac

03/14/2017 at 11:52AM

16
#441 - Stop and think / @ms_uncountable

07/07/2017 at 11:14AM

16
#442 - Gurukandhamoorthi / @Gurukandhamoor1

07/10/2017 at 02:06PM

16
#443 - Ron Alexssen / @Ralexhere

11/08/2017 at 06:19PM

16
#444 - Spacesh1p / @spacesh1pdev

01/04/2018 at 10:26AM

16
#445 - Pereant osores / @viniciusxp

04/30/2018 at 08:04AM

16
#446 - z0c / @zerocabal

06/06/2018 at 02:00PM

16
#447 - ハヤシ / @0__098

07/25/2018 at 02:07PM

16
#448 - Jurica / @Jurica34581259

11/16/2018 at 12:27PM

17
#449 - RobertT / @techrt2050

07/22/2014 at 03:35AM

17
#450 - James Ryland Miller / @longhornxtreme

07/29/2014 at 05:44AM