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

571 active golfers, 1948 entries

Leaderboard (lowest score wins):
14
#331 - xarmux / @xarmux

10/24/2015 at 09:10PM

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

11/02/2015 at 05:04PM

14
#333 - Pete Sevander / @Sevanteri

11/12/2015 at 01:27PM

14
#334 - Kostas / @blackraven_13

02/23/2016 at 03:20PM

14
#335 - glepha / @glepha_vim

03/15/2016 at 03:18AM

14
#336 - M S / @b1790037

03/15/2016 at 08:24PM

14
#337 - Andrew C. / @isarl

03/16/2016 at 01:40PM

14
#338 - エクシル / @sicoh395

04/07/2016 at 02:27PM

14
#339 - Jake Griffin / @J4K0_G

04/22/2016 at 11:45PM

14
#340 - Ryan Dwyer / @ryan_dwyer

06/05/2016 at 10:07PM

14
#341 - jan sos / @jann6373

06/13/2016 at 03:24PM

14
#342 - yudera / @yudemente

06/14/2016 at 02:01PM

14
#343 - Ryan van Rensburg / @rdvr001

07/21/2016 at 01:12PM

14
#344 - 王运 / @640138017

07/24/2016 at 02:08PM

14
#345 - Jeremiah Goyette / @JeremiahGoyette

08/01/2016 at 06:29AM

14
#346 - Quatrix / @Quatrix

08/10/2016 at 09:31PM

14
#347 - citaret / @citaret

08/28/2016 at 03:16AM

14
#348 - TweetDreams / @TweetMusicians

10/09/2016 at 07:02AM

14
#349 - John Barbero Unenge / @JBarberU

11/18/2016 at 01:43PM

14
#350 - BlackCap / @BlackCapCoder

11/30/2016 at 09:45AM

14
#351 - tPenguinLTG / @tpenguinltg

01/03/2017 at 01:00PM

14
#352 - Hans Yelek / @hans_yelek

01/12/2017 at 12:21AM

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

04/10/2017 at 02:04PM

14
#354 - Wang Wu / @rubepeg

05/12/2017 at 06:31AM

14
#355 - dadav 🥀 / @__dadav__

08/18/2017 at 04:56PM

14
#356 - Kaydo Alders / @Yousousen

03/13/2018 at 05:31PM

14
#357 - Dylan Nelson / @dlnnlsn

06/08/2018 at 06:02AM

14
#358 - Mahesh Ramchandani / @m_sharp

08/21/2018 at 03:35AM

14
#359 - Luis Rodriguez / @luisthecoder

11/14/2018 at 11:51PM

14
#360 - etwyniel / @etwyniel

12/31/2018 at 05:59PM