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

507 active golfers, 1668 entries

Leaderboard (lowest score wins):
16
#451 - André Peric Tavares / @AndrePeric

07/24/2016 at 05:43PM

16
#452 - 알카포 / @alkpo12

09/09/2016 at 07:46AM

16
#453 - Ian van der Linde / @Ian_vdl

09/16/2016 at 04:16PM

16
#454 - Ilya Ezepov / @iezepov

12/05/2016 at 09:21AM

16
#455 - Colin Jacobs / @coljac

03/14/2017 at 11:52AM

16
#456 - Stop and think / @ms_uncountable

07/07/2017 at 11:14AM

16
#457 - Gurukandhamoorthi / @Gurukandhamoor1

07/10/2017 at 02:06PM

16
#458 - Ron Alexssen / @Ralexhere

11/08/2017 at 06:19PM

16
#459 - Spacesh1p / @spacesh1pdev

01/04/2018 at 10:26AM

16
#460 - Pereant osores / @viniciusxp

04/30/2018 at 08:04AM

16
#461 - z0c / @zerocabal

06/06/2018 at 02:00PM

16
#462 - ハヤシ / @0__098

07/25/2018 at 02:07PM

16
#463 - Jurica / @Jurica34581259

11/16/2018 at 12:27PM

16
#464 - PJ Frazer / @pj_frazer

11/22/2018 at 05:41PM

16
#465 - Michael Lemur / @mlemur123

11/28/2018 at 08:44AM

16
#466 - Graham Singer / @grahamsinger

01/19/2019 at 10:55PM

16
#467 - churaki / @churaki

01/26/2019 at 04:55AM

16
#468 - Zach Russell / @ZacharyRRussell

02/07/2019 at 04:21PM

16
#469 - Mateen Ulhaq / @sicariusnoctis

02/12/2019 at 09:05AM

17
#470 - RobertT / @techrt2050

07/22/2014 at 03:35AM

17
#471 - James Ryland Miller / @longhornxtreme

07/29/2014 at 05:44AM

17
#472 - Alex / @ninjabassist777

07/30/2014 at 11:16PM

17
#473 - Justin Knag / @justinknag

08/28/2014 at 12:07PM

17
#474 - Cory Knapp / @coryknapp

09/26/2015 at 02:31AM

17
#475 - Jakob Schöttl / @jschoettl

12/20/2015 at 04:37AM

17
#476 - Feras / @faldah

04/24/2016 at 01:15AM

17
#477 - pankaj singh / @pankajsingh013

01/16/2019 at 10:54AM

17
#478 - Oren Koriat / @KoriatOren

01/17/2019 at 06:11PM

18
#479 - Julius Hövel / @JulesFH

07/20/2014 at 03:16PM

18
#480 - Ryan O'Donnell / @bt_ryanodonnell

08/08/2014 at 03:58PM