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

519 active golfers, 1730 entries

Leaderboard (lowest score wins):
12
#181 - timerella® / @timerella

11/17/2016 at 10:43PM

12
#182 - YNWP / @ynw_P

12/07/2016 at 11:48AM

12
#183 - Marcin / @Marcin89439917

12/31/2016 at 01:02AM

12
#184 - Alex Linden / @alexwlinden1

04/19/2017 at 07:01PM

12
#185 - Brian Hall / @_bruab_

05/05/2017 at 01:01PM

12
#186 - Carl Egbert / @CarlOEgbert

06/11/2017 at 09:10PM

12
#187 - David Gustavsson / @mrGustaphe

06/15/2017 at 08:56AM

12
#188 - moritz / @moritz45081535

06/18/2017 at 04:16PM

12
#189 - Christian Stammen / @c0smiq

06/30/2017 at 08:38AM

12
#190 - Ben Hill / @KaizenSoze70

10/12/2017 at 06:32PM

12
#191 - John C Shea / @MHSSachems

02/04/2018 at 11:29AM

12
#192 - Arijus / @argshook

02/09/2018 at 09:58AM

12
#193 - Pavol Slamka / @Archipedes

03/12/2018 at 10:41PM

12
#194 - Lisa Ugray / @lisa_ugray

03/18/2018 at 01:56PM

12
#195 - Jeff / @sir_wiggles3

09/09/2018 at 08:37PM

12
#196 - Robin De Mol / @RobinDeMol

09/14/2018 at 09:19AM

12
#197 - Mihai / @mihaicristiant

12/04/2018 at 02:04PM

12
#198 - Kris Ezra / @kris_ezra

02/03/2019 at 09:15PM

12
#199 - Sebastien Nicoud / @sebnukem

02/04/2019 at 01:17AM

12
#200 - Henrique Malheiro / @rike09

02/04/2019 at 09:09PM

12
#201 - 默罕默德 / @Rt6RjEAJ987Woes

02/20/2019 at 09:17AM

12
#202 - Vimfiz / @vimfiz

04/23/2019 at 09:25PM

13
#203 - Jonas Höglund / @FireyFly

07/16/2014 at 01:38PM

13
#204 - Kerson Hsiao / @KersonHsiao

07/19/2014 at 11:48AM

13
#205 - omesh / @panditaomesh

07/23/2014 at 02:52PM

13
#206 - Alex K / @alex_kononovich

07/23/2014 at 08:55PM

13
#207 - Zapata / @Incredible_JFP

07/27/2014 at 09:21AM

13
#208 - Zach Ingbretsen / @ZIngbretsen

07/29/2014 at 11:13PM

13
#209 - Bart / @oneofmanybarts

08/04/2014 at 08:32AM

13
#210 - Domon / @Domon

08/06/2014 at 08:19AM