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
#181 - Pavol Slamka / @Archipedes

03/12/2018 at 10:41PM

12
#182 - Lisa Ugray / @lisa_ugray

03/18/2018 at 01:56PM

12
#183 - Jeff / @sir_wiggles3

09/09/2018 at 08:37PM

12
#184 - Robin De Mol / @RobinDeMol

09/14/2018 at 09:19AM

13
#185 - Jonas Höglund / @FireyFly

07/16/2014 at 01:38PM

13
#186 - Kerson Hsiao / @KersonHsiao

07/19/2014 at 11:48AM

13
#187 - omesh / @panditaomesh

07/23/2014 at 02:52PM

13
#188 - Alex K / @alex_kononovich

07/23/2014 at 08:55PM

13
#189 - Zapata / @Incredible_JFP

07/27/2014 at 09:21AM

13
#190 - Zach Ingbretsen / @ZIngbretsen

07/29/2014 at 11:13PM

13
#191 - Bart / @oneofmanybarts

08/04/2014 at 08:32AM

13
#192 - Domon / @Domon

08/06/2014 at 08:19AM

13
#193 - Dmitriy / @_dpy_

08/20/2014 at 09:25PM

13
#194 - Johan Helsing / @jkhelsing

08/23/2014 at 02:39PM

13
#195 - Vim Golfer / @thevimgolfer

09/15/2014 at 01:40PM

13
#196 - Timothée Gauthier / @zmf_tim

11/16/2014 at 12:25AM

13
#197 - Filipe Almeida / @filipe_almeida

12/31/2014 at 10:07AM

13
#198 - Jordana Lachow / @TomofBedlam

01/13/2015 at 12:06AM

13
#199 - kobby / @_kafdot_

01/18/2015 at 11:26PM

13
#200 - Arno ℇrpenbeck / @javacgn

01/19/2015 at 12:19PM

13
#201 - Skúli Jóhannsson / @skulibj

06/26/2015 at 07:00PM

13
#202 - Jack Z / @itszhou

06/28/2015 at 05:33PM

13
#203 - Ian Trophy / @prfrgg

02/01/2016 at 08:48AM

13
#204 - Cristian Lupașcu / @clupasq

02/12/2016 at 09:53PM

13
#205 - Jan Bundesmann / @janbundesmann

04/04/2016 at 01:09PM

13
#206 - Will / @obiwan__k3n00bi

07/31/2016 at 07:03PM

13
#207 - Yann / @yannstadnicki

02/21/2017 at 05:14PM

13
#208 - caplod / @caplod

03/26/2017 at 10:06AM

13
#209 - Charlie OConor / @charlieoconor

10/01/2017 at 09:18PM

13
#210 - niwatoco / @yoshitune9

07/20/2018 at 03:24PM