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

519 active golfers, 1730 entries

Leaderboard (lowest score wins):
12
#151 - Kongqun Yang / @KongqunY

10/28/2014 at 05:17AM

12
#152 - Dane Summers / @dsummersl

10/31/2014 at 12:55PM

12
#153 - John Smith / @temp_soraismus

11/19/2014 at 06:15AM

12
#154 - Andrew Leung / @aleungpivotal

12/22/2014 at 05:37PM

12
#155 - Alex Birdsall / @OilCanSamson

12/22/2014 at 09:23PM

12
#156 - mark0829 / @mark0829

01/27/2015 at 11:44PM

12
#157 - no name / @vimgol

01/30/2015 at 03:54PM

12
#158 - Eduardo / @earada

02/15/2015 at 04:40PM

12
#159 - xieyh11 / @xieyh11

02/16/2015 at 03:35AM

12
#160 - pftb12345 / @pftb12345

03/31/2015 at 01:49PM

12
#161 - Charles Joachim / @cacplate

04/21/2015 at 02:19AM

12
#162 - Antony Scriven / @antonyscriven

05/05/2015 at 04:43PM

12
#163 - Slurpie Chapdash / @SlurpieChapdash

05/11/2015 at 02:45PM

12
#164 - Personal Life Trackr / @PersLifeTrackr

05/27/2015 at 10:36PM

12
#165 - Lifepillar / @lifepillar

07/23/2015 at 09:47PM

12
#166 - Kirill Cherkashin / @kirjs

09/19/2015 at 10:15PM

12
#167 - Mikael Saltzman / @MikaelSaltzman

09/26/2015 at 04:49PM

12
#168 - DespicableJerk / @JerkDespicable

10/22/2015 at 03:30PM

12
#169 - retro / @tryphopp

01/20/2016 at 08:27AM

12
#170 - Janine Cheng / @janineist

02/14/2016 at 06:40AM

12
#171 - ben kavanagh / @bkava

02/23/2016 at 03:39AM

12
#172 - Dimitar Dimitrov / @kurkale6ka

03/11/2016 at 04:42PM

12
#173 - Saki Gw / @Sakigw

04/03/2016 at 06:59PM

12
#174 - Robber Toe / @robbertoe

04/03/2016 at 09:28PM

12
#175 - Michal Sylwester / @msylw

05/27/2016 at 08:31AM

12
#176 - Ram Tamtam / @ramtamtamtam

06/23/2016 at 10:08AM

12
#177 - Fran├žois Marais / @maraisf

08/09/2016 at 06:02PM

12
#178 - Constantine / @ConstantineHatz

09/27/2016 at 08:21PM

12
#179 - Stanislav / @prstad

09/28/2016 at 09:09AM

12
#180 - Bill Ruddock / @biinari

10/31/2016 at 04:37AM