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):
12
#211 - Jeff / @sir_wiggles3

09/09/2018 at 08:37PM

12
#212 - Robin De Mol / @RobinDeMol

09/14/2018 at 09:19AM

12
#213 - Mihai / @mihaicristiant

12/04/2018 at 02:04PM

12
#214 - Kris Ezra / @kris_ezra

02/03/2019 at 09:15PM

12
#215 - Sebastien Nicoud / @sebnukem

02/04/2019 at 01:17AM

12
#216 - Henrique Malheiro / @rike09

02/04/2019 at 09:09PM

12
#217 - 默罕默德 / @Rt6RjEAJ987Woes

02/20/2019 at 09:17AM

12
#218 - Vimfiz / @vimfiz

04/23/2019 at 09:25PM

12
#219 - Chester Yap / @Chest_ErYap

07/22/2019 at 12:27PM

12
#220 - theBecwar / @thebecwar

08/19/2019 at 06:40PM

12
#221 - Baine Wedlock / @BaineWedlock

09/24/2019 at 01:29PM

12
#222 - Brandon Harrison / @llAboutB

09/24/2019 at 10:22PM

12
#223 - vimgolfer / @vimgolfer7

10/22/2019 at 02:06AM

12
#224 - Lory / @Lory46845742

11/13/2019 at 09:52AM

12
#225 - Jason Neylon / @jasonneylon

03/01/2020 at 11:37AM

12
#226 - countime / @countime1

03/13/2020 at 08:33AM

12
#227 - floyd / @floyd10086

04/01/2020 at 03:03AM

12
#228 - Moatvald / @moatvald

05/21/2020 at 07:45AM

12
#229 - Ming Dai / @MingDai2

07/01/2020 at 04:29PM

12
#230 - hepebexè / @hepebexe

12/19/2020 at 05:52PM

12
#231 - roudens / @roudens2

01/12/2021 at 12:14AM

12
#232 - Michel Viktor / @tomkpz

08/02/2021 at 03:41AM

12
#233 - Jean George / @JeanGeo20504212

10/01/2021 at 06:02PM

13
#234 - Jonas Höglund / @FireyFly

07/16/2014 at 01:38PM

13
#235 - Kerson Hsiao / @KersonHsiao

07/19/2014 at 11:48AM

13
#236 - omesh / @panditaomesh

07/23/2014 at 02:52PM

13
#237 - Alex K / @alex_kononovich

07/23/2014 at 08:55PM

13
#238 - Zapata / @Incredible_JFP

07/27/2014 at 09:21AM

13
#239 - Zach Ingbretsen / @ZIngbretsen

07/29/2014 at 11:13PM

13
#240 - Bart / @oneofmanybarts

08/04/2014 at 08:32AM