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

519 active golfers, 1730 entries

Leaderboard (lowest score wins):
16
#451 - Etienne Tremel / @etiennetremel

02/06/2016 at 01:49PM

16
#452 - Kevin Gisi / @cheerskevin

02/24/2016 at 08:23AM

16
#453 - ELINGUI Pascal Uriel / @elinguiuriel

04/20/2016 at 12:34PM

16
#454 - Jason Pleau / @JasonPleau

05/06/2016 at 02:14AM

16
#455 - Steven Moazami / @mong8se

05/10/2016 at 01:19AM

16
#456 - Andres Araya / @arayaandresfco

05/15/2016 at 07:59PM

16
#457 - quiggy🌹 / @quiggy

05/18/2016 at 02:20PM

16
#458 - Ameen P / @Ameen_P1

06/23/2016 at 04:59PM

16
#459 - Timothy Caleb Nordlo / @tnordloh

06/30/2016 at 04:03AM

16
#460 - André Peric Tavares / @AndrePeric

07/24/2016 at 05:43PM

16
#461 - 알카포 / @alkpo12

09/09/2016 at 07:46AM

16
#462 - Ian van der Linde / @Ian_vdl

09/16/2016 at 04:16PM

16
#463 - Ilya Ezepov / @iezepov

12/05/2016 at 09:21AM

16
#464 - Colin Jacobs / @coljac

03/14/2017 at 11:52AM

16
#465 - Stop and think / @ms_uncountable

07/07/2017 at 11:14AM

16
#466 - Gurukandhamoorthi / @Gurukandhamoor1

07/10/2017 at 02:06PM

16
#467 - Ron Alexssen / @Ralexhere

11/08/2017 at 06:19PM

16
#468 - Spacesh1p / @spacesh1pdev

01/04/2018 at 10:26AM

16
#469 - Pereant osores / @viniciusxp

04/30/2018 at 08:04AM

16
#470 - z0c / @zerocabal

06/06/2018 at 02:00PM

16
#471 - ハヤシ / @0__098

07/25/2018 at 02:07PM

16
#472 - Jurica / @Jurica34581259

11/16/2018 at 12:27PM

16
#473 - PJ Frazer / @pj_frazer

11/22/2018 at 05:41PM

16
#474 - Michael Lemur / @mlemur123

11/28/2018 at 08:44AM

16
#475 - Graham Singer / @grahamsinger

01/19/2019 at 10:55PM

16
#476 - churaki / @churaki

01/26/2019 at 04:55AM

16
#477 - Zach Russell / @ZacharyRRussell

02/07/2019 at 04:21PM

16
#478 - Mateen Ulhaq / @sicariusnoctis

02/12/2019 at 09:05AM

16
#479 - Phoon / @justflashhim

05/10/2019 at 07:43PM

17
#480 - RobertT / @techrt2050

07/22/2014 at 03:35AM