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
#61 - Smylers / @Smylers2

02/11/2016 at 12:06PM

11
#62 - Michael Buckley / @apolatg

02/13/2016 at 09:26PM

11
#63 - Jaron Hamlik / @jdhamlik

02/27/2016 at 04:24AM

11
#64 - Mister Knister / @vimgolf_ctrl_x

03/08/2016 at 12:56PM

11
#65 - Dinesh Bhosale / @MrDineshBhosale

04/01/2016 at 01:42PM

11
#66 - Alex Ch / @_AlexCh_

04/15/2016 at 10:44PM

11
#67 - John Goes / @johnwgoes

05/09/2016 at 01:26AM

11
#68 - John Doe Sr. / @johndoe67890543

05/23/2016 at 10:47PM

11
#69 - jdupont655 / @jdupont655

09/02/2016 at 02:57PM

11
#70 - Stephen Aument / @saument

09/04/2016 at 03:19AM

11
#71 - loki2441 / @loki2441

09/11/2016 at 12:30AM

11
#72 - manbogot / @gmanbor

10/02/2016 at 09:40AM

11
#73 - Nico / @_Nico_Caro

10/03/2016 at 06:32PM

11
#74 - poke / @useraaaaaaaaaaf

10/05/2016 at 02:49PM

11
#75 - trx / @trxdbg

10/13/2016 at 07:10AM

11
#76 - Arca Artem / @arcaartem

12/29/2016 at 11:33PM

11
#77 - Pierre Maoui / @poupougnac

12/31/2016 at 11:01AM

11
#78 - Zhihong Liu / @pieapple03

02/21/2017 at 02:13AM

11
#79 - Alexander Bessonov / @nonsleepr

03/15/2017 at 11:00PM

11
#80 - Ilya Shakirov / @aelaau

03/22/2017 at 09:34AM

11
#81 - Solomon / @Trugbildjaeger

04/02/2017 at 10:32AM

11
#82 - 梧桐王子 / @WutongYujie

04/30/2017 at 09:23AM

11
#83 - Chris Robertson / @chrisxrobertson

05/22/2017 at 12:18PM

11
#84 - Melvin Cheung / @MelvinCheung

05/25/2017 at 06:19PM

11
#85 - John Smith / @johns32768

06/17/2017 at 04:42PM

11
#86 - Bennett Bernardoni / @BBernardoni

06/28/2017 at 10:18PM

11
#87 - 杨洋 / @176795444

08/29/2017 at 11:34AM

11
#88 - Benoit Mortgat / @Benoit_Mortgat

11/14/2017 at 01:51PM

11
#89 - BarbaJol / @drpproteus

01/06/2018 at 11:44AM

11
#90 - Dominic Z / @thammaaa

01/24/2018 at 12:38PM