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

509 active golfers, 1678 entries

Leaderboard (lowest score wins):
16
#421 - Deepak Surti / @dmsurti

03/16/2015 at 03:32PM

16
#422 - Jeffrey Gu / @Jeffrey_Gu

03/19/2015 at 10:00PM

16
#423 - VimGolf-suka / @vg_suka

03/30/2015 at 01:26PM

16
#424 - William Ott / @oddalot

04/08/2015 at 04:17PM

16
#425 - Andrew Larson / @applarson

04/15/2015 at 01:33PM

16
#426 - Server Zero / @assaflavie

04/18/2015 at 07:39PM

16
#427 - chvzvhn / @chvzvhn

04/26/2015 at 06:38AM

16
#428 - Alex Bartol / @alexbartol

05/19/2015 at 05:42PM

16
#429 - Joel Gallant / @joelg236

06/09/2015 at 12:37AM

16
#430 - Hendrik Lammers / @hendriklammers

06/13/2015 at 08:39AM

16
#431 - Teemu Okkonen / @TeemuOkkonen

07/11/2015 at 04:08PM

16
#432 - McKay Ward / @mckayward

07/28/2015 at 03:39AM

16
#433 - Sergey Semushin / @Predelnik

08/26/2015 at 06:23AM

16
#434 - alex / @alexAngle8

08/30/2015 at 08:56AM

16
#435 - Mikołaj Morzy / @MikolajMorzy

09/01/2015 at 09:11PM

16
#436 - Kiet Nguyen / @kietnguyen86

09/29/2015 at 02:34PM

16
#437 - Andrey / @androzhk

10/15/2015 at 04:58PM

16
#438 - Gerald Tilma / @GeraldTilma

10/17/2015 at 10:56PM

16
#439 - Anshu Avinash / @anshu_avinash

10/18/2015 at 06:08PM

16
#440 - roboguy / @roboguy

10/18/2015 at 10:57PM

16
#441 - Ryan Marcotte / @ryanjmarcotte

11/15/2015 at 05:49PM

16
#442 - Izabel Jelenić / @IzabelJelenic

01/02/2016 at 09:00PM

16
#443 - fuck GFW / @ravishGFW

01/05/2016 at 12:10PM

16
#444 - Etienne Tremel / @etiennetremel

02/06/2016 at 01:49PM

16
#445 - Kevin Gisi / @cheerskevin

02/24/2016 at 08:23AM

16
#446 - ELINGUI Pascal Uriel / @elinguiuriel

04/20/2016 at 12:34PM

16
#447 - Jason Pleau / @JasonPleau

05/06/2016 at 02:14AM

16
#448 - Steven Moazami / @mong8se

05/10/2016 at 01:19AM

16
#449 - Andres Araya / @arayaandresfco

05/15/2016 at 07:59PM

16
#450 - quiggy🌹 / @quiggy

05/18/2016 at 02:20PM