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):
14
#271 - Jonas Ng / @jnshey

05/18/2015 at 05:35AM

14
#272 - Elizabeth / @sprinkles418

05/28/2015 at 04:40PM

14
#273 - Samuel Masuy / @samasuy

06/27/2015 at 02:22AM

14
#274 - Peter B / @l0wm4x

08/17/2015 at 08:34PM

14
#275 - Ilya / @evilguc

10/15/2015 at 05:07PM

14
#276 - xarmux / @xarmux

10/24/2015 at 09:10PM

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

11/02/2015 at 05:04PM

14
#278 - Pete Sevander / @Sevanteri

11/12/2015 at 01:27PM

14
#279 - Kostas / @blackraven_13

02/23/2016 at 03:20PM

14
#280 - glepha / @glepha_vim

03/15/2016 at 03:18AM

14
#281 - M S / @b1790037

03/15/2016 at 08:24PM

14
#282 - Andrew C. / @isarl

03/16/2016 at 01:40PM

14
#283 - エクシル / @sicoh395

04/07/2016 at 02:27PM

14
#284 - Jake Griffin / @J4K0_G

04/22/2016 at 11:45PM

14
#285 - Ryan Dwyer / @ryan_dwyer

06/05/2016 at 10:07PM

14
#286 - jan sos / @jann6373

06/13/2016 at 03:24PM

14
#287 - Yudi Matsuzake / @yudimatsuzake

06/14/2016 at 02:01PM

14
#288 - Ryan van Rensburg / @rdvr001

07/21/2016 at 01:12PM

14
#289 - 王运 / @640138017

07/24/2016 at 02:08PM

14
#290 - Jeremiah Goyette / @JeremiahGoyette

08/01/2016 at 06:29AM

14
#291 - Quatrix / @Quatrix

08/10/2016 at 09:31PM

14
#292 - citaret / @citaret

08/28/2016 at 03:16AM

14
#293 - TweetDreams / @TweetMusicians

10/09/2016 at 07:02AM

14
#294 - John Barbero Unenge / @JBarberU

11/18/2016 at 01:43PM

14
#295 - BlackCap / @BlackCapCoder

11/30/2016 at 09:45AM

14
#296 - tPenguinLTG / @tpenguinltg

01/03/2017 at 01:00PM

14
#297 - Hans Yelek / @hans_yelek

01/12/2017 at 12:21AM

14
#298 - Миша Сорокин / @rafmikovi4

04/10/2017 at 02:04PM

14
#299 - Wang Wu / @rubepeg

05/12/2017 at 06:31AM

14
#300 - Daniel / @0x9ABC

08/18/2017 at 04:56PM