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):
14
#271 - Joshua Greeenberg / @JoshuaGreeenber

12/19/2014 at 01:51PM

14
#272 - ぷりケツにるぽ / @nillpo

12/22/2014 at 04:16AM

14
#273 - Jake Eskel / @JakeEskel

12/29/2014 at 05:34AM

14
#274 - Matthieu Crapet / @mcr05

12/29/2014 at 09:51AM

14
#275 - Carlos A Henríquez Q / @lagunex

01/18/2015 at 03:51PM

14
#276 - Sebastian B / @cyborgryna

02/03/2015 at 12:04AM

14
#277 - Kenny / @zumalifeguard

03/12/2015 at 08:55PM

14
#278 - Walf / @walfieee

03/23/2015 at 09:26PM

14
#279 - Anderson Mesquita / @andersonvom

04/17/2015 at 07:21AM

14
#280 - Daniel Byron / @dansolo17

04/18/2015 at 12:58AM

14
#281 - Tom van der Lee / @TomVdLee

04/21/2015 at 07:08AM

14
#282 - Gracjan Grala / @gracjangrala

04/24/2015 at 10:42PM

14
#283 - Kevin Yokley / @kyokley19

04/26/2015 at 01:35AM

14
#284 - Jonas Ng / @jnshey

05/18/2015 at 05:35AM

14
#285 - Elizabeth / @sprinkles418

05/28/2015 at 04:40PM

14
#286 - Samuel Masuy / @samasuy

06/27/2015 at 02:22AM

14
#287 - Peter B / @l0wm4x

08/17/2015 at 08:34PM

14
#288 - Ilya / @evilguc

10/15/2015 at 05:07PM

14
#289 - xarmux / @xarmux

10/24/2015 at 09:10PM

14
#290 - Árpád Krejczinger / @krarpi

11/02/2015 at 05:04PM

14
#291 - Pete Sevander / @Sevanteri

11/12/2015 at 01:27PM

14
#292 - Kostas / @blackraven_13

02/23/2016 at 03:20PM

14
#293 - glepha / @glepha_vim

03/15/2016 at 03:18AM

14
#294 - M S / @b1790037

03/15/2016 at 08:24PM

14
#295 - Andrew C. / @isarl

03/16/2016 at 01:40PM

14
#296 - エクシル / @sicoh395

04/07/2016 at 02:27PM

14
#297 - Jake Griffin / @J4K0_G

04/22/2016 at 11:45PM

14
#298 - Ryan Dwyer / @ryan_dwyer

06/05/2016 at 10:07PM

14
#299 - jan sos / @jann6373

06/13/2016 at 03:24PM

14
#300 - Yudi Matsuzake / @yudimatsuzake

06/14/2016 at 02:01PM