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
#361 - Oliver Christ / @0liverChrist

08/04/2014 at 08:33PM

16
#362 - Matias Russitto / @mrussitto

08/05/2014 at 08:58PM

16
#363 - JonathanStarnes / @JON_STARNES

08/08/2014 at 02:05AM

16
#364 - Robert Dyer / @NavyJim13

08/08/2014 at 11:58PM

16
#365 - Mark Robinson / @SparkyRobinson

08/11/2014 at 08:08AM

16
#366 - Tj / @yrddy

08/13/2014 at 05:20AM

16
#367 - Daniel / @dazn159

08/15/2014 at 06:51PM

16
#368 - jabular / @jabular

08/15/2014 at 08:34PM

16
#369 - joshuavial / @joshuavial

08/16/2014 at 02:01AM

16
#370 - Adv_Zxy / @adv_zxy

08/22/2014 at 05:01AM

16
#371 - AC / @quadface

08/23/2014 at 05:28AM

16
#372 - Dr4k3 / @Dr4k3_LE

08/30/2014 at 10:32AM

16
#373 - Johan Linder / @imLinder

08/31/2014 at 03:00PM

16
#374 - Dario Avitabile / @tutticapaci

09/02/2014 at 10:31AM

16
#375 - Mattias Fransson / @azzidoos

09/08/2014 at 03:07PM

16
#376 - Enrico Carlesso / @carlesso

09/10/2014 at 09:14AM

16
#377 - mewEwExlad5 / @mewEwExlad5

09/11/2014 at 09:58PM

16
#378 - Florent F. / @floff01

09/13/2014 at 09:21PM

16
#379 - Herr Oppermann / @HerrOppermann

09/17/2014 at 01:58PM

16
#380 - Noah Ruderman / @noahc66260

09/27/2014 at 08:28AM

16
#381 - simonced / @simonced

09/27/2014 at 01:36PM

16
#382 - JForstreuter / @JForstr

10/06/2014 at 02:14PM

16
#383 - Daniel Burnett / @mango_cheetah

10/10/2014 at 12:51AM

16
#384 - Narek / @NarekCat

10/10/2014 at 07:28PM

16
#385 - Andy Zhang / @andyzg3

10/23/2014 at 03:12AM

16
#386 - kungfuchad / @kungfuchad

10/28/2014 at 07:19PM

16
#387 - Steve Lazaridis / @SteveLazaridis

11/03/2014 at 04:22PM

16
#388 - Inndy / @Inndy_tw

11/06/2014 at 04:38PM

16
#389 - jiangchuan / @tommy_he

11/16/2014 at 07:31PM

16
#390 - Martin Toma / @MartinToma

11/16/2014 at 10:09PM