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):
15
#331 - Michał Dytko / @DytkoM

12/21/2016 at 11:10AM

15
#332 - Sven R / @Sven73de

01/02/2017 at 03:04PM

15
#333 - Daniel / @Daniel00288663

03/17/2017 at 01:24PM

15
#334 - Alexander Gryson / @agryson

05/02/2017 at 04:51PM

15
#335 - Geoff / @RealGeoffErwin

10/09/2017 at 07:17PM

15
#336 - Prithviraj Patil / @dummyprithviraj

12/03/2017 at 04:33PM

15
#337 - Paul Draghicescu / @pdragy

03/22/2018 at 07:58AM

15
#338 - Jonathan Camilleri / @Too_Many_Taken

05/26/2018 at 01:19PM

15
#339 - 赤佐田奈葉 / @akasatanaha_

06/19/2018 at 05:19AM

15
#340 - Foo Bar / @FooBarely

08/16/2018 at 09:05PM

16
#341 - Florian Duraffourg / @fduraffourg

07/16/2014 at 12:33PM

16
#342 - Tanguy Antoine / @tanguyantoine

07/16/2014 at 12:37PM

16
#343 - Alexandre Ignjatovic / @bankair

07/16/2014 at 01:01PM

16
#344 - Carlos López / @morrizon

07/16/2014 at 07:35PM

16
#345 - Heath Patterson / @HeathPatterson

07/17/2014 at 12:31PM

16
#346 - Austin Cormier / @lotusmorc

07/17/2014 at 10:45PM

16
#347 - Waylon Cude / @waylon531

07/17/2014 at 11:13PM

16
#348 - My Info / @kwehlert

07/20/2014 at 03:32AM

16
#349 - vansan / @VinceVansan

07/21/2014 at 01:58PM

16
#350 - Jorge Chao / @MalcomOSX

07/22/2014 at 11:43PM

16
#351 - Saher El-Neklawy / @saherneklawy

07/23/2014 at 07:10AM

16
#352 - Matthias Wolf / @matz__e

07/24/2014 at 02:13PM

16
#353 - Fernan Smol / @pfos09

07/25/2014 at 02:38PM

16
#354 - Cezar Halmagean / @chalmagean

07/25/2014 at 08:03PM

16
#355 - Gwilym Kuiper / @gwilymk

07/30/2014 at 08:16AM

16
#356 - Sergio Lopez / @wapankh

07/30/2014 at 06:38PM

16
#357 - Kartik Shenoy / @kartikshenoy

07/31/2014 at 10:14PM

16
#358 - daveseibert / @daveseibert

08/02/2014 at 04:07AM

16
#359 - かしゅーなっつ@修行中 / @kashew_nuts

08/02/2014 at 06:32AM

16
#360 - Peter Strawson / @PeterStrawson

08/04/2014 at 12:57AM