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):
16
#511 - Spacesh1p / @spacesh1pdev

01/04/2018 at 10:26AM

16
#512 - Pereant osores / @viniciusxp

04/30/2018 at 08:04AM

16
#513 - z0c / @zerocabal

06/06/2018 at 02:00PM

16
#514 - ハヤシ / @0__098

07/25/2018 at 02:07PM

16
#515 - Jurica / @Jurica34581259

11/16/2018 at 12:27PM

16
#516 - PJ Frazer / @pj_frazer

11/22/2018 at 05:41PM

16
#517 - Michael Lemur / @mlemur123

11/28/2018 at 08:44AM

16
#518 - Graham Singer / @grahamsinger

01/19/2019 at 10:55PM

16
#519 - churaki / @churaki

01/26/2019 at 04:55AM

16
#520 - Zach Russell / @ZacharyRRussell

02/07/2019 at 04:21PM

16
#521 - Mateen Ulhaq / @sicariusnoctis

02/12/2019 at 09:05AM

16
#522 - Phoon / @justflashhim

05/10/2019 at 07:43PM

16
#523 - Frank / @fschoenm

07/22/2019 at 11:18AM

16
#524 - Christian / @paierlep

09/03/2019 at 10:14PM

16
#525 - Hans Lidiki / @HLidiki

09/07/2019 at 06:21PM

16
#526 - Timo Böhm / @TimoBohm

11/27/2019 at 07:32AM

16
#527 - Rory Smith / @alan0buchanan

09/14/2021 at 12:07AM

17
#528 - RobertT / @techrt2050

07/22/2014 at 03:35AM

17
#529 - James Ryland Miller / @longhornxtreme

07/29/2014 at 05:44AM

17
#530 - Alex / @ninjabassist777

07/30/2014 at 11:16PM

17
#531 - Justin Knag / @justinknag

08/28/2014 at 12:07PM

17
#532 - Cory Knapp / @coryknapp

09/26/2015 at 02:31AM

17
#533 - Jakob Schöttl / @jschoettl

12/20/2015 at 04:37AM

17
#534 - Feras / @faldah

04/24/2016 at 01:15AM

17
#535 - pankaj singh / @pankajsingh013

01/16/2019 at 10:54AM

17
#536 - Oren Koriat / @KoriatOren

01/17/2019 at 06:11PM

17
#537 - Jens / @jigfox

05/16/2022 at 06:09AM

18
#538 - Julius Hövel / @JulesFH

07/20/2014 at 03:16PM

18
#539 - Ryan O'Donnell / @bt_ryanodonnell

08/08/2014 at 03:58PM

18
#540 - Jonas / @j0na3

09/13/2014 at 10:00PM