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

509 active golfers, 1678 entries

Leaderboard (lowest score wins):
13
#211 - kobby / @_kafdot_

01/18/2015 at 11:26PM

13
#212 - Arno ℇrpenbeck / @javacgn

01/19/2015 at 12:19PM

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

06/26/2015 at 07:00PM

13
#214 - Jack Z / @itszhou

06/28/2015 at 05:33PM

13
#215 - Ian Trophy / @prfrgg

02/01/2016 at 08:48AM

13
#216 - Cristian Lupașcu / @clupasq

02/12/2016 at 09:53PM

13
#217 - Jan Bundesmann / @janbundesmann

04/04/2016 at 01:09PM

13
#218 - Will / @obiwan__k3n00bi

07/31/2016 at 07:03PM

13
#219 - Yann / @yannstadnicki

02/21/2017 at 05:14PM

13
#220 - caplod / @caplod

03/26/2017 at 10:06AM

13
#221 - Charlie OConor / @charlieoconor

10/01/2017 at 09:18PM

13
#222 - niwatoco / @yoshitune9

07/20/2018 at 03:24PM

13
#223 - Roberto Martínez / @nilp0inter

08/27/2018 at 10:27PM

13
#224 - Bennett / @bennettbackward

12/20/2018 at 01:03PM

14
#225 - Ricardo M. Vilchis / @ajkaanbal

07/16/2014 at 02:24PM

14
#226 - Bambu / @bambumandinga

07/16/2014 at 11:57PM

14
#227 - Pete Johns / @johnsyweb

07/17/2014 at 05:54AM

14
#228 - Marcin Sza / @coot_

07/17/2014 at 09:19AM

14
#229 - James / @Dronak

07/17/2014 at 03:50PM

14
#230 - Stanislav Nikolov / @valsinatss

07/17/2014 at 08:41PM

14
#231 - Dmitry Teslenko / @krab_mozga

07/18/2014 at 08:34AM

14
#232 - glennphillips / @glennphillips

07/19/2014 at 11:25PM

14
#233 - John Gray Cole / @johngraycole

07/20/2014 at 01:10AM

14
#234 - Omer Lachish / @rauchy

07/20/2014 at 11:26AM

14
#235 - joomy / @cattheory

07/20/2014 at 07:33PM

14
#236 - Patrick Negri / @patricknegri

07/20/2014 at 09:20PM

14
#237 - Tui Kiken / @TuiKiken

07/23/2014 at 12:34PM

14
#238 - pip_elekiban / @pip_elekiban

07/25/2014 at 07:28AM

14
#239 - Lieven Keersmaekers / @LievenKeersmaek

07/27/2014 at 05:44PM

14
#240 - Javier Blanco / @jbgutierrez

07/29/2014 at 10:00PM