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

572 active golfers, 1951 entries

Leaderboard (lowest score wins):
14
#361 - etwyniel / @etwyniel

12/31/2018 at 05:59PM

14
#362 - tp971 / @tp971

01/30/2019 at 07:38PM

14
#363 - zenwalker / @zenwalker93

03/11/2019 at 05:31PM

14
#364 - Ivo Blöchliger / @aigledesalpes

08/05/2019 at 07:59PM

14
#365 - monaqa / @mo_naqa

09/15/2019 at 06:21AM

14
#366 - Cassandra / @kascein

09/18/2019 at 06:22PM

14
#367 - Ariel Miculas / @ArielMiculas

09/19/2019 at 10:21PM

14
#368 - bladehaze / @bladehaze

05/03/2020 at 12:33AM

14
#369 - Jason / @roosjason

05/21/2020 at 10:37AM

14
#370 - x03n046 / @x03n046

05/13/2022 at 09:27AM

15
#371 - Paul Kunysch / @kunysch

07/17/2014 at 06:31AM

15
#372 - MonkeyBrains ISP / @monkeybrainsnet

07/26/2014 at 07:39AM

15
#373 - Dan Oneata / @DanOneata

07/26/2014 at 09:19PM

15
#374 - marvlow / @marv_low

08/06/2014 at 07:39PM

15
#375 - Blake / @blkbsstt

08/08/2014 at 07:04AM

15
#376 - Rafee / @rafee_buet

08/11/2014 at 08:44AM

15
#377 - Edgar Gonzalez / @gonzedge

09/03/2014 at 06:53AM

15
#378 - James T. Huggett / @Jmeshka

09/03/2014 at 09:26AM

15
#379 - John Smith / @literacyisgood

09/05/2014 at 06:23AM

15
#380 - Nate Eagleson / @NateEag

10/01/2014 at 01:02AM

15
#381 - Moritz / @mollitz

10/26/2014 at 01:47AM

15
#382 - Alex Hioreanu / @hioreanu

11/11/2014 at 01:36AM

15
#383 - Mauro Persano / @fzort

11/15/2014 at 05:35PM

15
#384 - Thomas Geßler / @th_gessler

11/17/2014 at 08:21PM

15
#385 - Benjamin Frölich / @kakazwerglein

11/18/2014 at 08:20PM

15
#386 - Glauco Pires / @grpires

11/25/2014 at 12:26AM

15
#387 - dosmanak / @dosmanak

03/10/2015 at 11:18AM

15
#388 - TheProgrammer971 / @tp971

03/14/2015 at 01:55AM

15
#389 - Stefan Knudsen / @knud32

06/12/2015 at 11:49PM

15
#390 - Bogumił Kamiński / @BogumilKaminski

10/26/2015 at 04:05PM