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):
12
#121 - Guillaume Perrin / @Jojolejobar

08/02/2014 at 06:48PM

12
#122 - madka / @lachrimae_pavan

08/02/2014 at 11:57PM

12
#123 - PLS / @jaegd

08/06/2014 at 05:52AM

12
#124 - Tom Cammann / @tea_sea

08/06/2014 at 01:08PM

12
#125 - Jake Elder / @JpegMe

08/07/2014 at 09:08PM

12
#126 - LC / @leeren

08/09/2014 at 09:26AM

12
#127 - Pepe / @GomTvIneluki

08/14/2014 at 10:58PM

12
#128 - booom / @ateukme

08/18/2014 at 09:01PM

12
#129 - Marcin Radomski / @_dextero

08/19/2014 at 02:12PM

12
#130 - Fan Zhang / @2bDeactivat3d

08/22/2014 at 08:57AM

12
#131 - April Gentle / @chen327684096

08/22/2014 at 12:33PM

12
#132 - Vim Golfer / @golfing_vim

08/24/2014 at 12:11PM

12
#133 - dylan / @dcourv

09/06/2014 at 07:04PM

12
#134 - Jeff / @just_geophree

09/13/2014 at 08:39PM

12
#135 - Mundi / @MarcusMundi

09/14/2014 at 04:57PM

12
#136 - vim doof / @vimdoof

10/07/2014 at 03:34PM

12
#137 - Charles H. Leggett / @cleggett

10/27/2014 at 04:30PM

12
#138 - Kongqun Yang / @KongqunY

10/28/2014 at 05:17AM

12
#139 - Dane Summers / @dsummersl

10/31/2014 at 12:55PM

12
#140 - John Smith / @temp_soraismus

11/19/2014 at 06:15AM

12
#141 - Andrew Leung / @aleungpivotal

12/22/2014 at 05:37PM

12
#142 - Alex Birdsall / @OilCanSamson

12/22/2014 at 09:23PM

12
#143 - mark0829 / @mark0829

01/27/2015 at 11:44PM

12
#144 - no name / @vimgol

01/30/2015 at 03:54PM

12
#145 - Eduardo / @earada

02/15/2015 at 04:40PM

12
#146 - xieyh11 / @xieyh11

02/16/2015 at 03:35AM

12
#147 - pftb12345 / @pftb12345

03/31/2015 at 01:49PM

12
#148 - Charles Joachim / @cacplate

04/21/2015 at 02:19AM

12
#149 - Antony Scriven / @antonyscriven

05/05/2015 at 04:43PM

12
#150 - Slurpie Chapdash / @SlurpieChapdash

05/11/2015 at 02:45PM