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

507 active golfers, 1668 entries

Leaderboard (lowest score wins):
16
#391 - Enrico Carlesso / @carlesso

09/10/2014 at 09:14AM

16
#392 - mewEwExlad5 / @mewEwExlad5

09/11/2014 at 09:58PM

16
#393 - Florent F. / @floff01

09/13/2014 at 09:21PM

16
#394 - Herr Oppermann / @HerrOppermann

09/17/2014 at 01:58PM

16
#395 - Noah Ruderman / @noahc66260

09/27/2014 at 08:28AM

16
#396 - simonced / @simonced

09/27/2014 at 01:36PM

16
#397 - JForstreuter / @JForstr

10/06/2014 at 02:14PM

16
#398 - Daniel Burnett / @mango_cheetah

10/10/2014 at 12:51AM

16
#399 - Narek / @NarekCat

10/10/2014 at 07:28PM

16
#400 - Andy Zhang / @andyzg3

10/23/2014 at 03:12AM

16
#401 - kungfuchad / @kungfuchad

10/28/2014 at 07:19PM

16
#402 - Steve Lazaridis / @SteveLazaridis

11/03/2014 at 04:22PM

16
#403 - Inndy / @Inndy_tw

11/06/2014 at 04:38PM

16
#404 - jiangchuan / @tommy_he

11/16/2014 at 07:31PM

16
#405 - Martin Toma / @MartinToma

11/16/2014 at 10:09PM

16
#406 - Erik Buček / @_EnterNameHere_

11/18/2014 at 03:54PM

16
#407 - Dylan Tomas Meissner / @ickypop

11/23/2014 at 01:28AM

16
#408 - Malte R / @maltoe

11/30/2014 at 02:29PM

16
#409 - Test User / @TestUserIgnore

12/04/2014 at 09:56PM

16
#410 - Rao Zvorovski / @RaoZvorovski

12/06/2014 at 07:20PM

16
#411 - Alex Serebryakov / @Doc_Livesey

12/07/2014 at 03:21PM

16
#412 - Lunar Mayor / @Lunarmayor

12/17/2014 at 10:21PM

16
#413 - Tact Overflow / @muppling

01/07/2015 at 01:32PM

16
#414 - Raynard, Jordan / @raynard_jordan

01/19/2015 at 09:22PM

16
#415 - Joshua Draper / @JoshuaBDraper

02/15/2015 at 04:07AM

16
#416 - Dmitry Zudochkin / @vredniy

02/18/2015 at 09:50AM

16
#417 - Christopher Giroir / @kelsin5

02/20/2015 at 09:00PM

16
#418 - Thiago Prado / @5k1pp3r

03/01/2015 at 08:16PM

16
#419 - Deepak Surti / @dmsurti

03/16/2015 at 03:32PM

16
#420 - Jeffrey Gu / @Jeffrey_Gu

03/19/2015 at 10:00PM