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):
11
#91 - ParasamGateZero / @ParasamGateZero

02/02/2018 at 05:22PM

11
#92 - GreenPinguin / @GreenPinguin2

03/14/2018 at 03:08PM

11
#93 - Guirec CORBEL / @GuirecCorbel

04/05/2018 at 03:59AM

11
#94 - DHM / @DHM29978992

04/15/2018 at 03:02AM

11
#95 - towc / @MateiCopot

05/25/2018 at 04:38PM

11
#96 - Daniël De Koker / @daniel_koker

07/01/2018 at 09:44PM

11
#97 - sspan / @sspantz

07/05/2018 at 02:12AM

11
#98 - Chris Dean / @ChrisDe62379742

07/11/2018 at 06:04PM

11
#99 - fsj / @FrogzSJ

08/17/2018 at 05:14AM

11
#100 - Rasmus Bergström / @JRasmusBm

09/29/2018 at 10:18PM

11
#101 - Chris Budetti / @ChrisBudetti

10/14/2018 at 03:51PM

11
#102 - Dax / @zacoxi

11/09/2018 at 06:51AM

12
#103 - John Meisner / @jmeisned

07/16/2014 at 02:17PM

12
#104 - Anonymer Nasenbär / @g0rdin

07/16/2014 at 03:37PM

12
#105 - RiccardoSven Risuleo / @riccardosven

07/16/2014 at 08:34PM

12
#106 - Caek / @Caek_

07/16/2014 at 11:43PM

12
#107 - farseer / @FarseerSee2012

07/17/2014 at 01:48AM

12
#108 - Michi Loro / @michiloro

07/17/2014 at 09:15AM

12
#109 - Adit Cahya Ramadhan / @aditcr8

07/17/2014 at 10:10AM

12
#110 - Rawshark / @rawshark_alive

07/17/2014 at 12:30PM

12
#111 - buz / @buzbone

07/17/2014 at 12:52PM

12
#112 - João Carvalho / @joaoCarvas

07/17/2014 at 11:00PM

12
#113 - Eric Potter / @pottereric

07/18/2014 at 12:49PM

12
#114 - Grigoriy Alexeev / @GrigoriyAlexeev

07/18/2014 at 01:17PM

12
#115 - Amir Kremer / @AmirKremer

07/20/2014 at 11:31AM

12
#116 - Joey Twiddle / @joeytwiddle

07/20/2014 at 06:57PM

12
#117 - Pedro Santos / @pedrosans

07/21/2014 at 07:36PM

12
#118 - Milind Ganjoo / @mganjoo

07/24/2014 at 06:28AM

12
#119 - Kai Yuan / @kentyuan

07/25/2014 at 09:40AM

12
#120 - Joakim Hansen / @gnofs

07/29/2014 at 11:50PM