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

483 active golfers, 1571 entries

Leaderboard (lowest score wins):
17
#451 - James Ryland Miller / @longhornxtreme

07/29/2014 at 05:44AM

17
#452 - Alex / @ninjabassist777

07/30/2014 at 11:16PM

17
#453 - Justin Knag / @justinknag

08/28/2014 at 12:07PM

17
#454 - coryknapp / @coryknapp

09/26/2015 at 02:31AM

17
#455 - Jakob Schöttl / @jschoettl

12/20/2015 at 04:37AM

17
#456 - Feras / @faldah

04/24/2016 at 01:15AM

18
#457 - Julius Hövel / @JulesFH

07/20/2014 at 03:16PM

18
#458 - Ryan O'Donnell / @bt_ryanodonnell

08/08/2014 at 03:58PM

18
#459 - Jonas / @j0na3

09/13/2014 at 10:00PM

18
#460 - Patrick Mitchell / @jpmitche11

10/10/2014 at 01:58AM

18
#461 - Yuval Goncz / @YGoncho

12/24/2014 at 11:14AM

18
#462 - d1uckym d1uckym / @d1uckym

02/16/2015 at 06:44AM

18
#463 - shugen / @shugeno

03/16/2015 at 10:33PM

18
#464 - ɐʇnɥsɐpoʇ / @todashuta

03/25/2015 at 09:02AM

18
#465 - Marcus Buffett / @MarcusBuffett

10/05/2015 at 07:16PM

18
#466 - TS / @tiredsounds

01/27/2016 at 05:09AM

18
#467 - Micha / @michman89

08/14/2016 at 04:30PM

18
#468 - James Potter / @JJPotterkowski

10/22/2016 at 04:13AM

18
#469 - Paul Inc / @hiniol1982

09/17/2017 at 04:54PM

19
#470 - Joseph Siddall / @jbsiddall

07/30/2014 at 02:52AM

19
#471 - Matthew Barrington / @mbarrin

07/30/2014 at 09:25PM

19
#472 - Bobby Matson / @bomatson

08/07/2014 at 04:59PM

19
#473 - Jesse Morton / @Jesse_Motion

11/03/2014 at 07:22AM

19
#474 - Daniel Pham / @dany_pham

10/16/2015 at 04:41AM

21
#475 - Remi Bernotavicius / @bobbobbio

07/18/2014 at 02:56AM

21
#476 - Halsey Smith / @HalseySmith3

10/10/2017 at 06:23PM

23
#477 - Mark / @mowen01

07/28/2014 at 05:56AM

23
#478 - Cleberson Gomes / @Cleber_son

08/19/2018 at 07:52PM

24
#479 - Simon Mölzer / @h0wser

08/25/2014 at 03:15PM

24
#480 - Tom Duijf / @tomduijf

10/27/2018 at 02:46PM