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

519 active golfers, 1730 entries

Leaderboard (lowest score wins):
15
#331 - marvlow / @marv_low

08/06/2014 at 07:39PM

15
#332 - Blake / @blkbsstt

08/08/2014 at 07:04AM

15
#333 - Rafee / @rafee_buet

08/11/2014 at 08:44AM

15
#334 - Edgar Gonzalez / @gonzedge

09/03/2014 at 06:53AM

15
#335 - James T. Huggett / @Jmeshka

09/03/2014 at 09:26AM

15
#336 - John Smith / @literacyisgood

09/05/2014 at 06:23AM

15
#337 - Nate Eagleson / @NateEag

10/01/2014 at 01:02AM

15
#338 - Moritz / @mollitz

10/26/2014 at 01:47AM

15
#339 - Alex Hioreanu / @hioreanu

11/11/2014 at 01:36AM

15
#340 - Mauro Persano / @fzort

11/15/2014 at 05:35PM

15
#341 - Thomas Geßler / @th_gessler

11/17/2014 at 08:21PM

15
#342 - Benjamin Frölich / @kakazwerglein

11/18/2014 at 08:20PM

15
#343 - Glauco Pires / @grpires

11/25/2014 at 12:26AM

15
#344 - dosmanak / @dosmanak

03/10/2015 at 11:18AM

15
#345 - TheProgrammer971 / @tp971

03/14/2015 at 01:55AM

15
#346 - Stefan Knudsen / @knud32

06/12/2015 at 11:49PM

15
#347 - Bogumił Kamiński / @BogumilKaminski

10/26/2015 at 04:05PM

15
#348 - Ethan Stewart / @EthanS279

12/23/2015 at 08:46PM

15
#349 - Laurent Atlan / @laurentatlan1

12/30/2015 at 10:11PM

15
#350 - Vaisian / @Vaisian

07/07/2016 at 05:51PM

15
#351 - Rasmus / @SBareSSomErMig

09/16/2016 at 09:30PM

15
#352 - Kyouma / @kyoumaJohn

10/14/2016 at 05:12PM

15
#353 - Etienne Florent / @EtienneFlorent

11/25/2016 at 10:46AM

15
#354 - Michał Dytko / @DytkoM

12/21/2016 at 11:10AM

15
#355 - Sven R / @Sven73de

01/02/2017 at 03:04PM

15
#356 - Daniel / @Daniel00288663

03/17/2017 at 01:24PM

15
#357 - Alexander Gryson / @agryson

05/02/2017 at 04:51PM

15
#358 - Geoff / @RealGeoffErwin

10/09/2017 at 07:17PM

15
#359 - Prithviraj Patil / @dummyprithviraj

12/03/2017 at 04:33PM

15
#360 - Paul Draghicescu / @pdragy

03/22/2018 at 07:58AM