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):
13
#211 - Roberto Martínez / @nilp0inter

08/27/2018 at 10:27PM

14
#212 - Ricardo M. Vilchis / @ajkaanbal

07/16/2014 at 02:24PM

14
#213 - Bambu / @bambumandinga

07/16/2014 at 11:57PM

14
#214 - Pete Johns / @johnsyweb

07/17/2014 at 05:54AM

14
#215 - Marcin Sza / @coot_

07/17/2014 at 09:19AM

14
#216 - James / @Dronak

07/17/2014 at 03:50PM

14
#217 - Stanislav Nikolov / @valsinatss

07/17/2014 at 08:41PM

14
#218 - Dmitry Teslenko / @krab_mozga

07/18/2014 at 08:34AM

14
#219 - glennphillips / @glennphillips

07/19/2014 at 11:25PM

14
#220 - John Gray Cole / @johngraycole

07/20/2014 at 01:10AM

14
#221 - Omer Lachish / @rauchy

07/20/2014 at 11:26AM

14
#222 - joomy / @cattheory

07/20/2014 at 07:33PM

14
#223 - Patrick Negri / @patricknegri

07/20/2014 at 09:20PM

14
#224 - Tui Kiken / @TuiKiken

07/23/2014 at 12:34PM

14
#225 - pip_elekiban / @pip_elekiban

07/25/2014 at 07:28AM

14
#226 - Lieven Keersmaekers / @LievenKeersmaek

07/27/2014 at 05:44PM

14
#227 - Javier Blanco / @jbgutierrez

07/29/2014 at 10:00PM

14
#228 - Clinton シ / @iblamefish

07/30/2014 at 08:05PM

14
#229 - Patrick Pitoscia / @Patrick03960431

08/03/2014 at 04:01AM

14
#230 - Jeremy Ruten / @yjerem

08/03/2014 at 08:42AM

14
#231 - Stefan Schmidt / @stafue

08/08/2014 at 01:18PM

14
#232 - Harald H / @metellius

08/21/2014 at 08:34PM

14
#233 - Fnord Everywhere / @FnordE

08/22/2014 at 07:18AM

14
#234 - Florian Lücke / @CannibalGorilla

08/26/2014 at 09:07AM

14
#235 - Some(coder) / @hauleth

09/02/2014 at 10:00PM

14
#236 - Robbie Clarken / @robbieclarken

09/07/2014 at 10:38PM

14
#237 - mnx / @mnxx

09/10/2014 at 12:48PM

14
#238 - Michael Comerford / @MComerford1

09/16/2014 at 12:31AM

14
#239 - Patrick Oscity / @der_padde

09/16/2014 at 02:51PM

14
#240 - evimgolf / @evimgolf

09/21/2014 at 07:42PM